Forum Moderators: coopster
I'm developing a small PHP/MySQL web application, and I'm currently stuck with greek characters.
I want to let users insert, through a XHTML form, some text (english or greek) in a MySQL table, and then echo it to PHP generated XHTML pages.
More specifically, i want :
- users to type in plain characters (english OR greek)
- the MySQL add queries to store plain characters (in order to be able to browse to database with phpMyAdmin and see actual characters and not unicode)
- the MySQL select queries to return plain characters, so the HTML source would show greek characters in plain greek and not in unicode
The main reason I want this (beside being able to browse the table in phpMyAdmin), is because I don't want one greek character to take 5 characters (as unicode) in the database.
I'm thinking about limiting some fields to x characters, and I don't want it to be x characters for input in english and 5x for input in greek
I'm sure it is possible, but how?
I have managed to type some greek text in a testpage form/textfield (using the language bar in both Windows XP and Kubuntu 7.10), the greek characters are stored in the database as unicode, which is successfully retrieved as unicode (correctly interpreted by browser, but unreadable in the source). (And the english characters are stored "as is", which is basically what I want for greek characters too!)
I'm using (for the moment) my personal Dreamhost hosting plan, that is
- PHP 5
- MySQL 5.0.16
The tables collation (after several tests) are in utf8_general_ci
Thank you!
you might look into using ISO-8859-7 which include the greek monotonic character set.