![]() |
|
|
|||||||
| VCL4PHP VCL for PHP. Questions or comments about the Visual Component Library for PHP, post them here! |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi!
I'm programing for Poland. I have mysql (5.0.33) database (latin2_general_ci). Main data encoding for this region is ISO-8859-2. Data in database are already set (I'm responding for presentation and append) In my project I have Database->Charset = latin2 Unit->Encoding = Central European (ISO) |iso-8859-2 I have also some labels with texts with some national characters: ążśźęćŁĄŻŚĆĘŃ In effect, I have: DBGrid with correctly presented national characters, but every controls edited in design time are NOT presented correctly (I see bush except national characters). Change Unit->Encoding to UTF8 does not bring expected results (I have labels presented correctly, but data in a dbgrid NOT). Situation 1 Situation 2 It seems to me, like every time, design time edited controls has texts saved in UTF8 even a xml.php file has ANSI encoding. My question is: How should I configure my IDE (and several files) to take expected effects? (for example - everything encoded in latin2) regards M Last edited by mariusz; 1st February 2010 at 13:39. |
| Sponsored Links |
|
|
|
|||
|
I use language portuguese and I have this problem too.
I convert my Database to utf-8, document type to utf-8 and tamplate file to utf-8 and resolve problem in major cases (qx). I make this function and I use to set text from database in labels and combos. function RetornaUTF8($string) { $encoding = "UTF-8"; if ((mb_detect_encoding($string.'x', 'UTF-8, ISO-8859-1')) != $encoding) { $string = utf8_encode($string); } return($string); } You can adapt it to your case. I hope help you, but I stay yet being spanced by d4php auhauhuhahuahua. |
|
|||
|
I have resolved my problem in the case when I'm using UTF. After Database connect I'm calling sql 'set names utf8'. It helps.
I still can not resolve problem with ISO-8859-1 encoding. See my thread BUG - Characters encoding vicmazurca Thank you for your tips. As you, I have resolved this other way, but I appreciate your try. |