|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I have an INI file which was saved as unicode encoded and contain 3 languages : English, Spanish and Hebrew. Reading the file using GetPrivateProfileString the API function assumes that the INI file is encoded using the same encoding the system is using hence if the locale is "Spanish - Mexico" it assumes that the INI file is using Spanish and when the locale is "Hebrew" is assumes that the locale is "Hebrew". It all results is one of these languages displayed as ??. If the locale is "Spanish - Mexico" then the Hebrew is "????" and if the locale is "Hebrew" the Spanish is "Espa?ol". is these a way to fix that ? Reading both languages using the INI API ? EB |
|
#2
|
|||
|
|||
|
What's the structure of your profile?It contains 3 languages like this?
English title=English content Spanish title=Spanish content Hebrew title=Hebrew content The Same content has 3 lines in 3 languages.. |
|
#3
|
|||
|
|||
|
The file is pasted below. I am 1st reading the [General] then read the [Languages] sequentially until I get to the END key and then the [Questions].
I parse the [Questions] keys to X strings and display them in labels. The INI file looks like: ---------- INI start ---------- [General] Leson= Lable=Tester ExerciseType=Vucabulary [Languages] L1=Espaņol L2=English L3=עברית L4=END [Questions] #The order of the phrasez should be the same as the order of the languages. Q1=1 Espaņol, 1 English, 1 עברית Q2=2 Espaņol, 2 English, 2 עברית Q3=3 Espaņol, 3 English, 3 עברית Q4=4 Espaņol, 4 English, 4 עברית Q5=END ---------- INI end ---------- Thanks EB |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Reading INI file encoded in diferant locales. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|