Storing foreign languages in a string

Hi all.
I have a multi-language application. It has a textfield that allows users to type in values in a language of their choice. This value is stored in a string. The class which contains this string will be serialized. My problem is how can I retrieve the value of that string, after de-serialization, and display it back to the user in the same language it was enter?
My solution was to take the value the user has entered and convert it into unicode. Therefore, when I display the string, it will always be in the original language. Is there a better solution?
thanks,
Paul

Strings are already in Unicode, you know. And you would have to do something to prevent the user from seeing what they typed in, if your code does what you say, so there must be something you haven't said.

Similar Messages

  • Taking over foreign language string from other application(VB6)

    I have an VB6 program and an C# program.
    My C# program have to take over several strings, which is foreign language, from VB6 program.
    I want to use some file but cannot use text file because it doesn't keep the original foreign language text.
    Which format do I use to transfer string between VB6 and C# program?
    If I explain in detail, it'll be like following.
    VB6 program have following table.
    English                                  German(or other foreign language)
    Setting                                  Einstellung
    Close                                     Zu Schließen
    Cancel                                   Rückgängig Machen
    This window will be closed         Das Fenster wird geschlossen
    I want to send these English-Foreign language pair to the C# so that C# can use it.

    Is it possible to save string as text file with Unicode?
    If possible, translating is no problem.
    My program consists of VB6 program and C# program.
    VB6 program calls C#.
    I will make following string and save as some file format from VB6.
    Setting/Einstellung
    Close/Zu Schließen
    Cance/Rückgängig Machen
    This window will be closed/Das Fenster wird geschlossen
    C# will read it, parse it and assign to 2-dimensional string array and some method will return corresponding foreign language string like following.
       string ft = VariableForeignLanguageText("This window will be closed");//ft will have Das Fenster wird geschlossen
    My question is how to save text file with Unicode format from VB6?
    (Sorry, my question became VB6 question)

  • 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

  • How do I purge foreign language files from OS X, 10.8, without using purchased software?

    I jumped from Snow Leopard on an older MBP to a new MBP with Mtn Lion already installed, and though my older MBP had all but English and Spanish languages deleted from the Snow Leopard install, it appears that I do now have many foreign languages I would rather not have on my hard disk.  I ran across an app from Stellar Software, Speedup Mac, that has a demo version, but without paying the $29 purchase price purging of language files cannot be done.  (It was this app that showed me that all those other languages were hidden on my drive.)  I am simply wondering if there is lesser expensive apps for stripping languages from 10.8 or simple command line instructions that I (not a usual Terminal user) could use to accomplish this "downsizing".  BTW, I'm not too keen on reinstalling 10.8 just to purge the unwanted languages.  I've got plenty of hard drive space (yes, it is HDD not Flash-based) but I think this new MBP would start up faster w/o the extra files.  Despite going from an MBP with a Core2Duo to an MBP with a Corei5, my new machine is way slower starting up.  Much gracias everyone.

    I recommend that you do not do this. Extraneous language files do not occupy much space, and removing them has been known to break future upgrades for those apps. There is also no way to undo their removal, short of restoring your system from a backup.
    Your computer's performance is unaffected by the presence of these localized language files. Deleting them will result in no performance improvement whatsoever. Localized language resources are stored in resource folders contained within each app. They load what is required according to your specifed settings in System Preferences.

  • Using a foreign language with the Java I/O, and saving to flat file.

    I want to use a foreign language in my program, in particular, russian. I want to be able to input the russian text into a GUI and then save the data in a flat file as well as retrieve it again. I am able to save some type of data to the flat file but it is unreadable. Question marks or some other unreadable characters appear instead.
    I am also not able to write in a foreign font. Can someone give me some advice for how to input a foreign language into with a GUI, save the information in a flat file, and retrieve it again.

    If you have got a String in Java somehow regardless of interior encoding mode, you can write it in a text file with an encoding you would like (e.g., UTF8).
    //import java.io.*;
    String str = "ABCEDFG";
    try{
       BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("out.txt"),"UTF8"));
       bw.write(str);
       bw.close();
    }catch(IOException ioe){
        //process
    }

  • 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

  • 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,

  • Foreign languages

    My customer has asked that I come up w something that will interchange the english text in my vi to a foreign language.  He said something about including an *.ini file.  Not sure I have a full grasp on what he wants.  I think what he was getting at was to create the vi in english and include an ini file that would some how convert it to the language in the ini file.  ie...english charaters to say Japaneese...This would include labels on the front panel as well as the error codes if any are generated.   Would this be a daunting task??
    Solved!
    Go to Solution.

    Hi Clint
    There's some documentation on this included in the help files of most versions of LabVIEW.
    The basic idea is to export all strings from the VI into a VI string file, translate the file and then re-import the strings to the VI. This would be a little daunting but it's perfectly possible. 
    Does that help?
    Kind Regards
    Chris | Applications Engineer NIUK

  • Field Header displayed in Foreign Language while reteriving records.

    Hi all,
    I am facing MultiLingual problem when i reterieve the main table records,The field Code /Header is displayed in one Foreign Language like (French/german). the need is to display the Field Code/Header in English. what modification i need to put in code if i need to display the Header in english.
    The problem
    Approve        Posición de catálogo       GUID Client Code       Proveedor   Número de contrato         País de utilización          Identificación del proveedor ............
    something like this for the Field header, but the record values are displaying as English.
    i am using com.sap.mdm  JAVA API, and the new patch 5.5.42.65
    what will be the reason and how to rectify it?
    With Thanks,
    Mary Joseph

    Hi,
      This happened to me also. What happens in display mode PARVW shows one value but when u double click on the record it shows the original value. This is the value that is stored internally in table. Use this value in ur select query.
    Regards,
    Raghavendra.

  • Foreign language character support

    This question is for oracle 9i and above, on windows and linux.
    Is there a way to create a foreign language dictionary that contains words from 2 or more languages? The words are to be stored in the native character set of the
    language, along with the phonetic spelling and other data.
    Example:
    ENGLISH
    Main Entry: book
    Pronunciation: 'buk
    Function: noun
    Etymology: Middle English, from Old English bOc; akin to Old High German buoh book, Gothic boka letter
    1 a : a set of written sheets of skin or paper or tablets of wood or ivory b : a set of written, printed, or blank sheets bound together into a volume c : a long written or printed literary composition d : a major division of a treatise or literary work e : a record of a business's financial transactions or financial condition -- often used in plural <the books show a profit> f :
    GERMAN
    book
    bestseller -- das meistverkaufteste Buch des Jahres
    Bible -- das allein maßgebende Buch
    to bind a book -- ein Buch binden
    to bind a book in boards -- ein Buch kartonieren
    book -- das Buch
    a book for critical readers -- ein Buch für gehobene Ansprüche
    this book is mine -- das Buch gehört mir
    the book reads well -- das Buch liest sich gut
    the book sells well -- das Buch geht gut
    the book sells well -- das Buch verkauft sich gut
    that book there -- das Buch dort
    the book you want -- das Buch, das sie möchten?
    to dogear -- Eselsohren in ein Buch machen
    Table design
    language varchar2(15), -- eng, ger, rus, spn
    word varchar2(20),
    sound clob, -- mp3 file
    picture clob, -- jpeg file
    description varchar2(1000); -- mostly free text
    The SOUND mp3 file and picture jpeg files should be stored IN the database, not as
    an operating system file.
    Also, need to store special characters, such as diacritical marks
    (german unlaut ö, spanish tilde ~)
    I believe this will require supporting multiple character sets, simultaneously.
    Also, assuming this can be done, what are the implications for
    entering data via web based forms and creating reports?

    this is also an issue for text messaging and emails in non-latin character sets.
    also, in a related issue, i have some symbols in passwords (symbols in the latin alphabet like ~ and ^) that can't be recognized by the web browser.  so, i'm unable to log in to some of my website accounts.

  • 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>

  • Catalog id is not getting displayed properly in Foreign Language (French)

    Hi All,
    I have created a web service id for the external catalog and I have assigned the same to one of the user. The name of the web service id is getting displayed properly in the shopping cart creation screen when the language is English. But when we are changing the user language to Foreign language (French), the name is not getting displayed properly.
    Could you please advise me if there any settings needs to be done in the parameters of the specific web service id. Thanks in advance for your help.

    Hi,
    Go to External Web Services and the select the web service ID. Then click on GOTO >Translation and select the language and enter the description of the web service as to be disaplyed while users log in French against the language.
    Thanks,
    Anshu

  • How do you install foreign language fonts?

    Does anyone know how to install foreign language fonts that doesn't come with iPad?

    SkipD wrote:
    What I want to know is: *will* it be, &amp; *how soon*?
    Nobody here has any way to tell you that, and Apple itself never provides this kind of info.  Make sure you tell them you want it here:
    http://www.apple.com/feedback/ipad.html
    (Even on a desktop/laptop Mac with the full version of OS X Ethiopic currently requires installing 3rd party software.  I can provide the source if you are interested)

  • My adobe illustrator is in a foreign language. how can i turn it into english?

    my adobe illustrator is in a foreign language. how can i turn it into english?

    First please remember this is a public forum.  If you are going to respond to the thread via e-mail please remove your signature prior to responding.
    To resolve your difficulties you will need to go to the Language & Text preference pane.  Once there click on Edit List and remove all languages besides English.  You will then likely need to remove and reinstall the trial as the language setting I believe is set during the installation process.

  • Hp printer 3050 all in one j610 series. My window is in a foreign language

    Hi, am wanting to purchase the above printer, it is 2nd hand & I urgently need to set it up to ensure it is working properly.
    I however cannot change the foreign language in the window to put in mine. Can anyone help please. I never received a manual.

    Hi @Seagul ,
    I see by your post that you would like to know how to change the language on the printer's display.
    I would be happy to help you.
    Select the Setup icon on the printer. (should be the first one or top one on the display)
    Select the third option in the list. (Language)
    Then select your desired language.
    If you are still not able to change the language, I can send the reset in a private message.
    In the forum beside your handle name just click on the envelope to view it.
    Have a great day!
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

Maybe you are looking for

  • Calling Stored Procedure with table type as In parameter from Java

    Hi Everyone, Can anyone help me with the sample code to call a stored procedure having input parameter of Table type (consisting of multiple fields) from Java. This job is currently being done by a BPEL process. We want to implement the same using Ja

  • WiFi only works near wireless router...

    I have been living in my uni house for 8months with no internet problems at all. Since last week, when I sit in the front room (where the router is) I can get internet connection, however when I move into my room (the next door room) the internet com

  • Database in menù Windows- Database missing

    Hi, I create e new site in PHP + MY SQL. (I installed and I verified it works, easy php in Windows 7) I don't see in menu Windows the Database item. I am performing Dewaweaver last version in Trial Mode. Best regards, Fabio

  • There was a RAISE without a handler. The application will now exit/

    Can someone help me figure this out, I can open Acrobat and run it for about 5 seconds, then this message pops up "There was a RAISE without a handler. The application will now exit." and Acrobat Pro closes. I am running Mac OSX 10.5.8 and Acrobat Pr

  • Java regular expression patteren.

    Ok can somone help me here. My freind wrote this program in java script and im trying to redo it in java. In one part he uses a regular expression some im trying to do th same thing but i cant gt it, heres what i have so far, import java.util.regex.*