Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 5th, 2004, 03:49 AM
ehboym ehboym is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 19 ehboym User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 58 m 48 sec
Reputation Power: 0
Question Reading INI file encoded in diferant locales.

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

Reply With Quote
  #2  
Old January 5th, 2004, 11:16 PM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
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..

Reply With Quote
  #3  
Old January 5th, 2004, 11:56 PM
ehboym ehboym is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 19 ehboym User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 58 m 48 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Reading INI file encoded in diferant locales.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT