View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005523 | JEDI VCL | 00 JVCL Components | public | 2011-03-25 16:55 | 2011-07-10 14:34 |
Reporter | ZENsan | Assigned To | jfudickar | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | Daily / GIT | ||||
Target Version | Fixed in Version | ||||
Summary | 0005523: TJvAppINIFileStorage lose unicode | ||||
Description | TJvAppINIFileStorage lose unicode on saving String properties. Sample application showing this is attached. | ||||
Tags | No tags attached. | ||||
2011-03-25 17:02
|
JEDI.zip (1,585 bytes) |
|
Could you give some more explanations? I'm using it with Delphi XE and the SVN Version of JCL and JVCL. I can't see any problems. Regards Jens |
2011-03-31 12:23
|
|
2011-03-31 12:23
|
|
|
1) Run it once (AppStorage will save the property Text) 2) Run again (AppStorage lost 2 characters from Text property) |
|
Ok, I'm not so fimilar with Unicode, but here is my explanation/workaround. 1. In the online help it's stated that the TIniFile is old stuff and that it allways was ansi, so the default is ansi. 2. Open your created ini-file in an unicode editor and change the codepage to utf-8 of the existing file. Restart your test application and from that moment unicode is working. The inifile component detects that the original file is unicode and stores it in the detected codepage. My Problem is, that I do not know how, what will be the best way to enhance the TAppIniStorage for a default codepage. Regards Jens |
|
Maybe before flushing first time (creating an INI file) we can create an empty UTF-8 text file (of course only for Unicode Delphi versions), and then call default INI file. And then everything wil work fine. |
|
Except that I don't think the ini file handling class can detect UTF-8 from an empty file. Can anyone test this? |
|
JvAppIniFileStorage1.IniFile.Encoding := TEncoding.Unicode; Solves the problem. Maybe we can check the delphi version and if it supports unicode, then just set the default encoding to, say, TEncoding.UTF8? |
|
The easier way is : JvAppIniFileStorage1.Encoding := TEncoding.Unicode; And the AppIniFileStorage has the default delphi behaviour (in point of ini encoding), so I do not see a need to change anything else. Regards Jens |
|
No change needed |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-03-25 16:55 | ZENsan | New Issue | |
2011-03-25 17:02 | ZENsan | File Added: JEDI.zip | |
2011-03-31 11:51 | jfudickar | Note Added: 0018492 | |
2011-03-31 11:51 | jfudickar | Status | new => feedback |
2011-03-31 12:23 | ZENsan | File Added: First run.png | |
2011-03-31 12:23 | ZENsan | File Added: Second run.png | |
2011-03-31 12:24 | ZENsan | Note Added: 0018493 | |
2011-03-31 21:33 | jfudickar | Note Added: 0018494 | |
2011-04-01 09:32 | ZENsan | Note Added: 0018499 | |
2011-06-07 17:41 | obones | Status | feedback => acknowledged |
2011-06-08 15:09 | obones | Note Added: 0018670 | |
2011-06-28 08:46 | ZENsan | Note Added: 0018807 | |
2011-07-10 14:32 | jfudickar | Note Added: 0018819 | |
2011-07-10 14:34 | jfudickar | Note Added: 0018820 | |
2011-07-10 14:34 | jfudickar | Status | acknowledged => resolved |
2011-07-10 14:34 | jfudickar | Resolution | open => fixed |
2011-07-10 14:34 | jfudickar | Assigned To | => jfudickar |