Find the answer to your Linux question:
Results 1 to 4 of 4
Hello, I have a java program that has to use specific character encoding (baltic 1257). When i run this program on a UTF debian system, i get hieroglyphs from this ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    2

    change system language


    Hello,

    I have a java program that has to use specific character encoding (baltic 1257). When i run this program on a UTF debian system, i get hieroglyphs from this program's output. If i change the system language to the one i need - it works fine, but the whole system changes to this language and i don't want that.

    What i need to do is figure out a way (if such exists) to run make this java process think that the system language is "lt-LT". Is this possible via some shell script or something like that?

    And do not suggest to convert this program to UTF instead of ASCII, because for some specific reasons, windows-1257 is required.

  2. #2
    Linux User
    Join Date
    Feb 2006
    Posts
    484
    run this program in terminal and set up the language variables
    the fastest way
    prompt> LC_ALL="the needed language"; programname parameters

  3. #3
    Just Joined!
    Join Date
    Mar 2009
    Posts
    2
    So if i wanted to write a shell script for that, should i do:

    export LC_ALL="lt-LT"
    java /blah/blah/something.java

    or would it be:

    LC_ALL="lt-LT"
    java /blah/blah/something.java

    or:

    LC_ALL="lt_LT"; java/blah/blah/something.java

    ?

  4. #4
    Linux User
    Join Date
    Feb 2006
    Posts
    484
    use the second one, i don't think export would be needed but maybe, if not works use the first one

    ";" only needed when you type two ore more commands into on line in a terminal its a command separator

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •