System.getProperty with foreign language

Hello All,
I've developed a program that uses System.getProperty("user.home"), in order to transfer files to that location.
Everything's going well as long as I'm using English version.
When one of my customers ran this using a foreign language (Turkish, but it seems to have the same effect on other languages), instead of c:\documents and settings\administrator, he got a wrong fonetic path, i.e. C:\DOCUMENTS AND SETTÝNGS\ADMÝNÝSTRATOR (check the I's, they're not the same), although he has the English path in his computer.
You can see this also when you change the regional settings in an English based Windows to Turkish.
How can I make the System property look at the correct path (again, this happens in other languages as well)?
Thanks,
Barak

Hmmm.... I didn't think I used toUpperCase in my code. When all else fails, my advice is to read the API...
[http://java.sun.com/javase/6/docs/api/java/lang/String.html#toUpperCase()]
<quote>
Note: This method is locale sensitive, and may produce unexpected results if used for strings that are intended to be interpreted locale independently. Examples are programming language identifiers, protocol keys, and HTML tags. For instance, "title".toUpperCase() in a Turkish locale returns "T?TLE", where '?' is the LATIN CAPITAL LETTER I WITH DOT ABOVE character. To obtain correct results for locale insensitive strings, use toUpperCase(Locale.ENGLISH).
</quote>

Similar Messages

  • Reading a text file with foreign language characters

    I'm trying to convert foreign language characters to English looking characters.  I have code that works, but only if I hard code the string with foreign language characters and pass it to the function. I cannot figure out how to get my program to read
    in the foreign characters from my file, they come in as garbage. 
    Since the function works when I pass a hard coded string to it, I'm pretty sure the problem is the way I have the Streamreader set up, it's just not reading the characters correctly...
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim FileRdr As StreamReader = New StreamReader "m:\test\charReplace.txt", System.Text.Encoding.UTF7)
    Dim ReplaceWrtr As StreamWriter ReplaceWrtr = System.IO.File.CreateText("M:\test\CharReplaceOut.txt")
    Do While FileRdr.Peek() >= 0
    Dim currentRec As String = FileRdr.ReadLine
    removeAccent(currentRec)
    ReplaceWrtr.WriteLine(currentRec)
    Loop
    ReplaceWrtr.Close()
    End Sub
    'Replace foreign language characters with English characters
    Function removeAccent(ByVal myString As String)
    Dim A As String = "--"
    Dim B As String = "--"
    Const AccChars As String = "ŠŽšžŸÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðñòóôõöùúûüýÿ"
    Const RegChars As String = "SZszYAAAAAACEEEEIIIIDNOOOOOUUUUYaaaaaaceeeeiiiidnooooouuuuyy"
    For i As Integer = 1 To Len(AccChars)
    A = Mid(AccChars, i, 1)
    B = Mid(RegChars, i, 1)
    myString = Replace(myString, A, B)
    Next
    removeAccent = myString
    End Function
    I know that removing the accent changes the meaning of the word, but this is what the user wants so it's what I need to do. 
    Any help is greatly appreciated!! :)
    Thanks!
    Joni

    Finally got it to work.  I had to remove the first 5 characters from the replacement string (ŠŽšžŸ), couldn't find encoding that would handle these, and to be honest, I didn't really need them.  The important ones are still there, was probably
    just overkill on my part.
    UTF7 worked for the rest...
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim FileRdr As StreamReader = New StreamReader("m:\test\charReplace.txt", System.Text.Encoding.UTF7)
    Dim ReplaceWrtr As StreamWriter
    ReplaceWrtr = System.IO.File.CreateText("M:\test\CharReplaceOut.txt")
    Do While FileRdr.Peek() >= 0
    Dim currentRec As String = FileRdr.ReadLine
    removeAccent(currentRec)
    ReplaceWrtr.WriteLine(currentRec)
    Loop
    ReplaceWrtr.Close()
    End Sub
    'Replace foreign language characters with english characters
    Function removeAccent(ByRef myString As String)
    Dim A As String = "--"
    Dim B As String = "--"
    Const AccChars As String = "ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðñòóôõöùúûüýÿ"
    Const RegChars As String = "AAAAAACEEEEIIIIDNOOOOOUUUUYaaaaaaceeeeiiiidnooooouuuuyy"
    For i As Integer = 1 To Len(AccChars)
    A = Mid(AccChars, i, 1)
    B = Mid(RegChars, i, 1)
    myString = Replace(myString, A, B)
    Next
    removeAccent = myString
    End Function
    Thanks for all your help!  Greatly appreciated :)
    -Joni

  • Getting weird adobe pop-up with foreign language characters and no download

    For the last week and change, it seems every time I have been prom,ptsd to download something from done reader, when I click on the "trust website", instead of the page and download opening up, I get an Adobe pop-up with completely foreign language (several different, it looks like) characters, and nothing to click on, and no download.  I'm on a Mac, version 10.8.5, on Safari.  What gives?????
    Cathy

    Thank you for the screenshot.  The text in the message says
    Before viewing PDF documents in this browser you must launch Adobe Reader and accept the End User License Agreement then quit and relaunch the browser.
    So all you need to do is to open the Adobe Reader app, accept the EULA, then restart your browser.
    I don't know why this message is displayed in Japanese, but I have seen similar reports in this forum for the latest Adobe Reader on Mac.

  • Stuck in recovery with foreign language can't insatll os COMPLICATED!!

    Stuck in recovery (lanuage is set to foreign country and not changing when clicking on any other country) no wifi connecting tried ethernet not working? Just bought from ebay..2010 macbook pro..it was working fine when first put it on then i wiped the hard drive and tried to reinstall os mavericks but i cant understand any if of it because its in foreign language setting i go up to the right hand corner and change the language but it still just stays the same? I think the airport card could be broke? I put in ethernet and it read it as working but still wouldn't letting me install os? Could someone help?

    A late 2011 MBP came with Lion (10.7).  Since you say that you have erased the HDD, I suggest that you do the following:
    YOU WILL NEED A SOLID INTERNET CONNECTION.
    Boot the MBP with the OPTION+COMMAND+R keys.
    That should result in a display with a revolving globe.
    This will connect you to the Apple servers and allow you to install the original OSX (LION).
    Follow the instructions.
    Installing Lion will create your own account with Apple.
    Then you may download and install Mavericks (10.9) from the App store..
    Ciao.

  • FDM - Errors with Foreign Language Characters in Load Files

    For our Netherlands data import file, our source account decriptions contain the character "ë". The account decription is not loaded to HFM, but we are receiving error messages when importing. Is there a way to ignore foreign language characters? Another post suggested "Administration", "Configuation Settings", "File Encoding Type" then set to "Unicode", but the version I am using does not have this option. Version is 11.1.1.3.
    Thank you!
    Melody

    Hello Melody,
    If you are using FDM v11.1.1.3.00 the file-encoding is defaulted to Unicode. It might be helpful to contact support.
    It could be your DB isn't setup to handle unicode characters (in this event the information would be stored in the SQL*Loader or MSSQL Logs). It could also be the file you are trying to import actually isn't "unicode" but more of a local ANSI/ASCII format.
    Most 'European' characters were supported in that release; and I know several clients that use it as expected.
    Thank you,

  • Using Pages with foreign languages

    I have often the need to write in Spanish, French and German. My system is default to american english. How can I change languages and apply the appropriate language dictionary for spelling check and grammar?

    Inspector > Text > More > Language

  • Importing songs with foreign languages

    i have imported japanese songs with japanese titles before on this computer. the japanese characters and titles were imported along with the songs, but it suddenly stopped working. not only do the titles not import, but the songs are not imported correctly, resulting in choppy songs. please...help!
    sony laptop   Windows XP  

    i have imported japanese songs with japanese titles
    before on this computer. the japanese characters and
    titles were imported along with the songs,
    For the titles to imported correctly you need to make sure that you still have Asian language support activated in your OS and also that the ID3 tags are correctly encoded.
    http://homepage.mac.com/thgewecke/mlingos9.html#itunes

  • Cfdocument with foreign languages (urdu/farsi)

    Adobe claims that writing from right to left should be
    possible (
    http://www.adobe.com/devnet/coldfusion/articles/printing_04.html)
    - but I have no success with my tests.
    I'm trying to create a document in urdu (later some other
    languages like farsi, japanese....). The language flows from right
    to left. I tryed using <p dir="rtl">text</p> (with
    p,span,div,table..). I also tried align="right" with all kind of
    html tags. Also style="text-align:right"......it all doesn't work.
    It just aligns the last word - the rest is "messed up" and just a
    bit aligned.
    Is it possible? Am I doing something wrong?

    here is a small example.
    quote:
    <cfdocument format="pdf" filename="test.pdf"
    overwrite="yes" fontembed="yes">
    <div dir="rtl" style="background-color:#6699CC">
    جن ججوں پر
    چیف جسٹس
    افتخار
    محمد
    چوہدری نے
    اعتراض کیا
    ان میں
    سپریم
    جوڈیشل
    کونسل کے
    سربراہ
    جسٹس جاوید
    اقبال،
    جسٹس
    عبدالحمید
    ڈوگر اور
    جسٹس
    چوہدری
    افتخار
    حیسن شامل
    ہیں۔ چیف
    جسٹس کی طرف
    سے پانچ
    وکلاء نے
    پیروی کی جن
    میں سپریم
    کورٹ بار کے
    صدر منیر
    ملک ،حامد
    خان،
    بیرسٹر
    اعتزاض
    احسن اور
    طارق محمود
    شامل تھے۔
    <br /><br />
    اٹارنی
    جنرل مخدوم
    علی خان نے
    سپریم
    جوڈیشل
    کونسل کے
    سامنے پیش
    ہو کر بتایا
    کہ وہ
    عدالتی
    نوٹس پر آئے
    ہیں اور اب
    جبکہ کونسل
    نے اس
    معاملے میں
    حکومت کو
    نوٹس جاری
    کر دیا ہے تو
    ممکن ہے کہ
    حکومت کوئی
    نیا وکیل
    مقرر کرے۔
    <br /><br />
    سپریم
    کورٹ کے
    باہر منگل
    کی صبح ہی سے
    سکیورٹی کے
    زبردست
    انتظامات
    کیے گئے تھے
    اورسماعت
    کے آغاز پر
    رینجرز یا
    نیم فوجی
    دستوں نے
    اسلام آباد
    میں
    پوزیشنیں
    سنبھال لی
    تھیں۔
    <br /><br />
    سماعت کے
    لیے جسٹس
    افتخار کو
    زبردستی
    سرکاری
    گاڑی میں
    سپریم کورٹ
    تک لایا
    گیا۔
    سرکاری
    گاڑی میں
    جانے سے ان
    کے انکار کے
    بعد کشمکش
    کے دوران
    چیف جسٹس کے
    کپڑوں کو
    بھی کھینچا
    گیا۔ جسٹس
    چودھری کے
    ساتھ کچھ
    وکلاء اور
    صحافی بھی
    سپریم کورٹ
    کی عمارت
    میں داخل
    ہونے میں
    کامیاب ہو
    گئے ۔
    </div>
    <div
    style="margin-top:30px;background-color:#FF0033;text-align:right">
    جن ججوں پر
    چیف جسٹس
    افتخار
    محمد
    چوہدری نے
    اعتراض کیا
    ان میں
    سپریم
    جوڈیشل
    کونسل کے
    سربراہ
    جسٹس جاوید
    اقبال،
    جسٹس
    عبدالحمید
    ڈوگر اور
    جسٹس
    چوہدری
    افتخار
    حیسن شامل
    ہیں۔ چیف
    جسٹس کی طرف
    سے پانچ
    وکلاء نے
    پیروی کی جن
    میں سپریم
    کورٹ بار کے
    صدر منیر
    ملک ،حامد
    خان،
    بیرسٹر
    اعتزاض
    احسن اور
    طارق محمود
    شامل تھے۔
    <br /><br />
    اٹارنی
    جنرل مخدوم
    علی خان نے
    سپریم
    جوڈیشل
    کونسل کے
    سامنے پیش
    ہو کر بتایا
    کہ وہ
    عدالتی
    نوٹس پر آئے
    ہیں اور اب
    جبکہ کونسل
    نے اس
    معاملے میں
    حکومت کو
    نوٹس جاری
    کر دیا ہے تو
    ممکن ہے کہ
    حکومت کوئی
    نیا وکیل
    مقرر کرے۔
    <br /><br />
    سپریم
    کورٹ کے
    باہر منگل
    کی صبح ہی سے
    سکیورٹی کے
    زبردست
    انتظامات
    کیے گئے تھے
    اورسماعت
    کے آغاز پر
    رینجرز یا
    نیم فوجی
    دستوں نے
    اسلام آباد
    میں
    پوزیشنیں
    سنبھال لی
    تھیں۔
    <br /><br />
    سماعت کے
    لیے جسٹس
    افتخار کو
    زبردستی
    سرکاری
    گاڑی میں
    سپریم کورٹ
    تک لایا
    گیا۔
    سرکاری
    گاڑی میں
    جانے سے ان
    کے انکار کے
    بعد کشمکش
    کے دوران
    چیف جسٹس کے
    کپڑوں کو
    بھی کھینچا
    گیا۔ جسٹس
    چودھری کے
    ساتھ کچھ
    وکلاء اور
    صحافی بھی
    سپریم کورٹ
    کی عمارت
    میں داخل
    ہونے میں
    کامیاب ہو
    گئے ۔
    </div>
    <p align="right">
    جن ججوں پر
    چیف جسٹس
    افتخار
    محمد
    چوہدری نے
    اعتراض کیا
    ان میں
    سپریم
    جوڈیشل
    کونسل کے
    سربراہ
    جسٹس جاوید
    اقبال،
    جسٹس
    عبدالحمید
    ڈوگر اور
    جسٹس
    چوہدری
    افتخار
    حیسن شامل
    ہیں۔ چیف
    جسٹس کی طرف
    سے پانچ
    وکلاء نے
    پیروی کی جن
    میں سپریم
    کورٹ بار کے
    صدر منیر
    ملک ،حامد
    خان،
    بیرسٹر
    اعتزاض
    احسن اور
    طارق محمود
    شامل تھے۔
    <br /><br />
    اٹارنی
    جنرل مخدوم
    علی خان نے
    سپریم
    جوڈیشل
    کونسل کے
    سامنے پیش
    ہو کر بتایا
    کہ وہ
    عدالتی
    نوٹس پر آئے
    ہیں اور اب
    جبکہ کونسل
    نے اس
    معاملے میں
    حکومت کو
    نوٹس جاری
    کر دیا ہے تو
    ممکن ہے کہ
    حکومت کوئی
    نیا وکیل
    مقرر کرے۔
    <br /><br />
    سپریم
    کورٹ کے
    باہر منگل
    کی صبح ہی سے
    سکیورٹی کے
    زبردست
    انتظامات
    کیے گئے تھے
    اورسماعت
    کے آغاز پر
    رینجرز یا
    نیم فوجی
    دستوں نے
    اسلام آباد
    میں
    پوزیشنیں
    سنبھال لی
    تھیں۔
    <br /><br />
    سماعت کے
    لیے جسٹس
    افتخار کو
    زبردستی
    سرکاری
    گاڑی میں
    سپریم کورٹ
    تک لایا
    گیا۔
    سرکاری
    گاڑی میں
    جانے سے ان
    کے انکار کے
    بعد کشمکش
    کے دوران
    چیف جسٹس کے
    کپڑوں کو
    بھی کھینچا
    گیا۔ جسٹس
    چودھری کے
    ساتھ کچھ
    وکلاء اور
    صحافی بھی
    سپریم کورٹ
    کی عمارت
    میں داخل
    ہونے میں
    کامیاب ہو
    گئے ۔
    </p>
    </cfdocument>

  • Why is Safari loading pages with foreign language characters?

    Help! the websites that I frequently go to randomly load in what looks like a russian or asian characters.
    Sometimes they are normal, sometimes not. The body of text (paragraphs) usually are normal and the headlines and banners are foreign.
    Is this a Safari issue or something else?
    thx Jeff

    Hi
    Go to Safari Preferences>Appearance. The Default Encoding ought to read "Western (ISO Latin 1). If your setting is different, click on the drop down menu and change to the above. Then, try a web site.

  • Typing with foreign languages on Nokia Asha 200

    I want to type and read Korean and Traditional Chinese on my Nokia 200, but so far I have no luck figuring out how to do this. I would really appreciate some help!

    Hi housekihana,
    Thank you for your post and welcome to the forums!
    Unfortunately it is not possible to install additional languages on the phone yourself. To resolve this you'll need to visit your local Nokia Care Point and ask them to install the language files on your phone. Please note that language availability depends on the region, so all languages may not be available at the care point.
    Hope this helps,
    Puigchild
    If you find this post helpful, a click upon the white star at bottom would always be appreciated.
    If it also solves your problem, clicking ACCEPT AS SOLUTION below it will benefit other users!

  • Mail loses thread when receiving replies with foreign language

    Hi,
    I have OSX set to english, but I receive a lot of mails in another language, meaning the replies often come in SV: , RES:, WG:, ANT: instead of RE:. When they come in anything other than RE: they don't get threaded.. what to do? Maybe edit the header? How?
    Thanks a lot to those that would know how to do this!

    Hello Melody,
    If you are using FDM v11.1.1.3.00 the file-encoding is defaulted to Unicode. It might be helpful to contact support.
    It could be your DB isn't setup to handle unicode characters (in this event the information would be stored in the SQL*Loader or MSSQL Logs). It could also be the file you are trying to import actually isn't "unicode" but more of a local ANSI/ASCII format.
    Most 'European' characters were supported in that release; and I know several clients that use it as expected.
    Thank you,

  • My mac will not open the adobe reader, it shows a foreign language in the response box when I try to open up something from the internet?

    Please help, My Mac will not open when I rtry to download something from the internet, a box with foreign language appears in the textbox?

    I have seen this a couple of times over the last few days here in the forum; the Reader 11.0.7 plugin for Mac displays the message in Japanese.  Here is the English translation.
    Before viewing PDF documents in this browser you must launch Adobe Reader and accept the End User License Agreement then quit and relaunch the browser.
    Do it, and the message will disappear.

  • Under System Preferences, Hardware, CD i DVD...  The menu text and dropdown choices are in a foreign Language.  I have my normal Language set to English.  What gives?

    Under System Preferences, Hardware, CD i DVD...  The menu text and dropdown choices are in a foreign Language.  I have my normal Language set to English.  What gives?

    Thanks for the reply. I only have English - Primary but I guess I could add Finland and then delete it...
    Okay, tried that, lots of variations including deleting all other languages and only using Finnish, and then using only British English etc - when guest is in Finnish the whole lot becomes Finnish/Suomi (see attached photos to compare with the ones above) - then when you delete Finnish and go back to English, everything is Englisg apart from 'Vierastilin käyttäjä' as above.
    Any other ideas where it stores that info - is there a dodgy preference file somewhere which needs zapping?

  • Foreign Language Spell Check with Mail

    I understand that using Pages, one can set different languages for Spell Check, but I seem unable to do this when writing e-mail messages. Is it possible to type an e-mail in a foreign language, and set Mail or is it elsewhere - to have spell-check not underline every foreign word in red - but to actually correct real spelling errors in the selected language - other then English? And can I then I toggle back and forth between spell-check in various languages, as my correspondences take place in a number of languages?
    Thanks in advance,
    john

    boksey wrote:
    your suggestion is specific to Mail
    Actually, any application that uses the basic text editing features of the OS will use the same spelling system. Pages seems to have its own spelling system that actually looks inferior (at least in my '08 version).
    what if I am looking for Hungarian - a language not listed in the pop-up section.
    You are going to have to do some research. There are a couple of options listed here: http://neowiki.neooffice.org/index.php/AddingAdditionalDictionaries
    I have no idea if they will work.
    A Google search suggests that Snow Leopard does have a Hungarian spell-check - but the question is - where?
    I don't think so. The link above indicates that you may be able to add dictionaries, including one for Hungarian. The screenshots were old, so I'm not sure if it still works. It's all in Hungarian so that's all I can tell from the site.
    And can it be used with Mail?
    Yes. Once you get it installed into the OS spelling system, it will be available throughout the OS - except for those applications that have their own system.

  • Problem with charsets for foreign languages

    hi
    i have a problem with a webapplication
    in my webapplication i have some code that gets data from a webpage of another webapplication. This other web application can use many foreign languages
    the problem is that those foreign languages contain some special characters, and those special chars aren't displayed the right way
    this is the code to get the data from the other webapp
    private static StringBuffer getContent(String sUrl) throws MalformedURLException, IOException  {
            StringBuffer content = new StringBuffer();
            URL url = new URL(sUrl);
            HttpURLConnection httpURLConn = (HttpURLConnection) url.openConnection();
            httpURLConn.setRequestProperty("charset", "utf-8");
            BufferedReader buffReader = new BufferedReader(new InputStreamReader(httpURLConn.getInputStream()));
            String inputLine;
            while ((inputLine = buffReader.readLine()) != null) {
                content.append("\n" + inputLine);
            return content;
        }as you see , i tried to set the encoding to UTF-8 but that did not solve the problem

    an example of those special chars
    fran�aisis displayed as
    code]
    fran��ais

Maybe you are looking for

  • Iphone 4S call echo

    Please fix this ASAP and anyone know of a fix.

  • How to find material recieved with excise duty or without excise duty

    HI how to find material recieved with or without excise duty , and which table  these data store . Because we need to develope one new report. Regards Ganesh

  • Hp 15-n278sa windows 8 instal

    Hi, so what i am having problems with my hp 15-n278sa. i have changed the hard drive from the original S.M.A.R.T hard drive to a 250gb sata hard drive as i didnt need that much space in my laptop and my main rig did. basically when i try to install w

  • Title Bar to include Topic Name - html5

    Hi Is it possible for the Title Bar value to reflect a variable, i.e. to include the Topic Name as part of its value? Currently it is a single value for every page produced, as set in the General Tab of the Multiscreen HTML5 Settings window. This is

  • Mircosoft Word 2004 opening when mac started up

    Hi, When I start up my mac, MS Word 2004 seems to want to start up. Do you know why this might be and how I might turn this off? Message was edited by: leedern