How to set a platform's default character encoding

Hi,
Does anybody know how to set how to set a platform's default character encoding in Java? Thank you.
Yugang
[email protected]

You do 0mean for Java, not from Java? (The latter would make absolutely no sense at all.) If so, pass it to the runtime using the -D switch (you've got SUN's java, right?):
java -Dfile.encoding=the-encoding-i-like the.name.of.YourClass

Similar Messages

  • Setting the default character encoding

    How do you set the default character encoding for the portal to UTF-8 so that unicode
    characters work within porlets?
    Any help would be much appreciated,
    Troy

    You can put this tag in the portal.jsp in the header:
    <meta http-equiv='Content-Type' content='text/html;charset=UTF-8'>
    "Troy" <[email protected]> wrote:
    >
    That doesn't seem to work when put into my portlet's content JSP. Is
    there another
    place I could put the page directive that will control the entire portal
    page?
    "Sai S Prasad" <[email protected]> wrote:
    Troy,
    you can try the page directive with encoding as:
    <%@ page contentType="text/html";charset="UTF-8" %>
    "Troy" <[email protected]> wrote:
    How do you set the default character encoding for the portal to UTF-8
    so that unicode
    characters work within porlets?
    Any help would be much appreciated,
    Troy

  • Setting DEFAULT character encoding ???

    To set the default character encoding to UTF-8 for JVM I can do the
    following on Solaris:
    LC_ALL=en_US.UTF-8; java ....
    How do I achieve the same on Windows?
    Is there a java property where I can specify the default character
    encoding or do I have to getBytes( str, "UTF-8") everywhere?
    Thanks,
    Artur...

    Hi Artur,
    there is a way. The property is file.encoding. Example:
    import java.io.*;
    public class ShowEncoding {
      public static void main(String[] args) {
        System.out.println("Default encoding: " +
            new InputStreamReader(System.in).getEncoding());
    }On my system I get the following results:
    java ShowEncoding Default encoding: Cp1252
    java -Dfile.encoding=UTF-8 ShowEncoding Default encoding: UTF8
    java -Dfile.encoding=Latin1 ShowEncoding Default encoding: ISO8859_1I don't know, if setting this property using the -D argument is documented or implementation-independendent. But so far, it was working for me. For setting the locale, you may use the properties user.language and user.region. But this is undocumented and implementation-dependendent.
    I wouldn't use these properties at all. I would rather specify the encoding in all constructors. Probably using an application property file.
    Good luck!
    Marcus.

  • My HP Officejet Pro 8600 Plus prints emails as landscape only; how to set to A4 as default?

    All of a sudden my printer has set to landscape printing of emails; how to set it portrait as default for printing?

    Hi there @OB1214 , welcome to the forums
    I understand your emails are printing in landscape. If the issue is only when printing emails, there may be a setting within your email settings to change the print settings.
    If all of your programs are printing in landscape, check the print settings on your computer.
    Changing Print Settings in Mac OS X
    Changing Print Settings in Windows 7
    I hope that helps!
    If the problem continues, please let me know the details and also which OS you are running.
    Thank you
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • [LENOVO Y50-70] How To Set NVIDIA Card as Default Graphic Adapter

    I have just bought Lenovo Y50-70. But i wonder how to set NVIDIA Card as default Graphic Adapter instead using Intel Card. Thanks

    hi monx,
    Welcome to the Forums.
    The Y50-70 uses Nvidia Optimus Technology to automatically switch between the Intel GPU (for power saving) and Nvida GPU (for maximum performance).
    To manually set the default graphics adapter, you will need to set this inside the Nvidia Control Panel > Manage 3D Settings.
       - Sample image
    More info:
    http://support.lenovo.com/us/en/documents/ht071337
    Regards

  • Default character encoding ???

    To set the default character encoding to UTF-8 for JVM I can do the
    following on Solaris:
    LC_ALL=en_US.UTF-8; java ....
    How do I achieve the same on Windows?
    Is there a java property where I can specify the default character
    encoding or do I have to getBytes( str, "UTF-8") everywhere?
    Thanks,
    Artur...

    Hi Artur,
    please see my responses to the same question you've posted in
    Forum Home > Internationalization
    Kind regards,
    Marcus

  • Default Character Encoding stuck on UTF-8 - Firefox 7

    I cannot change the Character Encoding - it is stuck on Unicode UTF-8 and I can not change it! When a web page opens I get these little boxes with "FF FD" instead of Quote marks. When I change the character encoding on that page using "View->Character Encoding" and click on the Western (ISO-8859-1), the page displays correctly. Every page opens using Unicode UTF-8 as the default.
    View->Character Encoding -- shows Unicode UTF-8 as the default.
    View->Character Encoding->Auto-detect -- shows OFF
    Tool->Options->Content->Advance->Fonts->Default Character Encoding -- shows Western (ISO-8859-1) as well as the "Allow Pages to choose their own fonts..." IS CHECKED in the check box
    THE PAGES ARE NOT UTF-8!!!! The "View Page Source" IS NOT Unicode UTF-8! -- It shows <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">.
    The "View Page Info" shows MetaTag - Content-Type: text/html; charset=iso-8859-1
    Why can I not change the Default Character Encoding?
    I would also like to point out that the Unicode UTF-8 seems to be broken because it is indicating that the QUOTE CHARACTER is an UNPRINTABLE character "FF FD"
    ----- EDIT -----
    The UTF-8 is not broken. The problem as pointed out in http://en.wikipedia.org/wiki/Replacement_character#Replacement_character is that my Firefox being STUCK processing UTF-8 encoding cannot read the clearly marked iso-8859-1 data. So the UTF-8 is reinterpreting smart quotes -&ldquo; and &rdquo;- (“ and ”) as replacement (unprintable) characters.
    So the real problem is why my Firefox is stuck on Unicode UTF-8

    The real problem is that the font that is used doesn't have those characters.
    Do you see the special quotes -“ and ” on this forum page?
    Does it help if you disable the website fonts and set another font as the default font?
    *Tools > Options > Content : Fonts & Colors > Advanced
    *http://en.wikipedia.org/wiki/Punctuation
    *http://en.wikibooks.org/wiki/Unicode/Character_reference/2000-2FFF

  • I am on itunes on my iphone, i bought a ringtone but i cant figure out how to set it as my default.

    I bought a ringtone using my itues store on my iphone, and bought a rigntone. How can I set it as my default. I cannot find the option to get it set up

    Hey kashaenaparisi,
    Thanks for the question. The following resource outlines how to change your default ringtone for all calls:
    Change your ringtone - Phone - iPhone Basics - Apple Support
    http://support.apple.com/kb/TI8
    If you wish to have a ringtone for a specific contact, see this resource:
    Set a special ringtone for a contact - Phone - iPhone Basics - Apple Support
    http://support.apple.com/kb/TI16
    Thanks,
    Matt M.

  • How to set the user's Default joboptions directory?

    Hello Experts,
    When we installed Acrobat Pro 8.x on our Win XP Pro systems our systems were NOT in a Windows Domain.  At that time the default location for user-created/customized joboptions files was:
    C:\Documents and Settings\<Username>\Application Data\Adobe\Adobe PDF\Settings
    where <Username> is the name of the LOCAL Windows user.
    A few years ago we migrated to a Windows Domain and converted our LOCAL users to domain users and disabled, but did not delete, the LOCAL user's account.  We did not remove the LOCAL user's Documents and Settings directory structure either.
    Our users now log into a DOMAIN rather than the LOCAL account.
    As a result of that process the user's Documents and Settings directory structure changed to;
      C:\Documents and Settings\<Username.DOMAINNAME>
    where DOMAINNAME is, of course, our Windows Domain Name.
    Now we are beginning to use Acrobat Distiller joboptions and I notice that when Acrobat/Distiller goes to save a user-created/customized joboptions file the default location has remained;
      C:\Documents and Settings\<Username>\Application Data\Adobe\Adobe PDF\Settings
    which is NOT the user who is logged in
    Acrobat/Distiller should use the Documents and Settings directory of the user who is actually logged in which is;
      C:\Documents and Settings\<Username.DOMAINNAME>\Application Data\Adobe\Adobe PDF\Settings
    This anomaly has created some confusion and appears to have created a dependency of the old LOCAL user's Documents and Settings directory preventing us from deleting it.
    Question:
    How can we force Acrobat/Distiller to use the Documents and Settings directory of the logged in user (eg: the Domain user)?
    In other words, how do we set the user's default joboptions directory?
    Pointers/tips/and tricks are most welcome.

    if the user is the one running the program, you can always get the home directory using System.getProperties ("user.home");
    If you are trying to get the properties of another user, you could try using setProperties to change the user name first, before getiting the home directory, but it probably won't work because of the security manager. You could read the /etc/passwd file and parse the path out, but once again, the user of the code would have to have appropriate permission.

  • SQ01 (How to set Global Area as default)

    Hi All
    In SQ01, i find 2 environments in Query Areas - Global Area & Standard Area. Everytime i execute SQ01 transaction, it takes me to Standard Area, then i have to change it to Global Area & then select the user group. I would like to know how i can set Global Area as default & also a particular user group, so that everytime i run SQ01, it directly takes me to Global Area & the particular user group, so i can execute my query directly instead of having to change it each time.
    Hope my problem is clear, await inputs.
    Vivek

    Hello Vivek,
    You need to maintian some default parameters in your User master record.
    Parameter ID :
    AQB for User Group
    AQW for Query Area.
    Select the AQB from the drop-down and give your default user group in the parameter value.
    Regards,
    Naimesh Patel

  • How to set group name as default value in People Picker in Infopath 2010

    How to set group name (shareoint Groupname)  as default value in People Picker in Infopath 2010

    Under the Developer tab in Infopath you can manage Loading Events, unfortunetly i dont have Visual Studio on this PC so i cant laborate, but i believe it's rather simple to figure out.
    Edit: Found a easier way, through Data > Default Values.

  • HT2506 How to set outlook as the default mail client for Preview

    When I try to us Preview to email PDFs the Apple Mail client is the default mail client that opens. I use Lion and would like to set Outlook as my default. Does anyone know how to do this? It has been suggested that you click command-P, select PDF and add Outlook there but there are no options to do this. I am stuck and would like some help. I am using outlook:mac2011 version 14.1.4 and Preview 5.5.1
    Cheers

    I did not find a way to change the target application for the "New Email with Attchment" service for files and folders. However, you can follow this instruction here to create ANOTHER service, that will use Outlook: http://www.officeformachelp.com/2010/11/create-a-service-to-attach-files-to-a-ne w-outlook-for-mac-mail-message/
    Hope this helps. Sebastian.

  • How to set local help as default in ID CS5?

    Just received a replacement laptop w/CS5 installed & cannot figure out how to disable/turn off community help...I want it to default to local help whether connected to the net or not.
    Thanks
    Update Info:
    Or, if setting local help as default is not possible, what about turning off or disabling internet sensing by the program?  This will be used in the field and sometimes slow connections are the only thing available.  Testing it on a dial-up connection, it just set there trying to access community help without allowing access to the local help until the dial-up connection was closed.

    Thanks Peter...I'd already found that, but when I first found it, the last section was not in that screen and in playing around, I found that Air was not installed proprly, uninstalled & re-installed that & that last section with the 2 ticks showed up & selected local help.
    Next, I get a message that there is no PDF reader installed...but a working copy of AR7 is & it works...I'm thinking that CS5 should be uninstalled & re-installed, however, that will have to wait until I can get the laptop back to the company we're working for.
    The community help window indicated the local help file to be 40Meg, but a search found no PDF that large on this machine.
    Is this PDF available for direct download & I'll just access it outside of the help screen if necessary.
    Laptop/program owner is in Canada, I'm visiting in Georgia & have an overseas flight on Wednesday...

  • HT1637 How to set gmail as my default email program?

    Hi, I have attempted to follow the instructions to change my default email program. However, when I open "mail" and go to general preferences, it gives me the options of selecting from an application downloaded on my computer. I want to use gmail as my default email program. But it isn't an ap on my computer, it's online. So how do I set gmail as my default email program? Thanks very much!

    If you mean set it in your browser, you can't As you already pointed out, gmail is not a program on your computer it is a web site. You need to get your gmail account into an email client, such as Mail, on your computer. Then set your default email client to Mail, which in effect will be the same as using gmail since Mail is set up with your gmail account.

  • How to set Spanish, ESN CP1252, , oracle Character Sets WE8MSWIN1252

    select * from NLS_DATABASE_PARAMETERS
    database characterset is
    NLS_CHARACTERSET               AL32UTF8
    NLS_NCHAR_CHARACTERSET         AL16UTF16 
    NLS_LANGUAGE                   AMERICAN
    NLS_TERRITORY                  AMERICAselect * from NLS_INSTANCE_PARAMETERS ;
    PARAMETER                         VALUE
    NLS_LANGUAGE                      SPANISH
    NLS_TERRITORY                     SPAINhow to set Spanish, ESN CP1252, , oracle Character Sets WE8MSWIN1252
    Please suggest.
    Thanks In advance

    Is it really ok to convert AL32UTF8 to WE8MSWIN1252?
    NLS_CHARACTERSET AL32UTF8
    to
    NLS_CHARACTERSET WE8MSWIN1252
    please suggest

Maybe you are looking for

  • Anyone else having mic problems after 5.1?

    I updated to ios 5.1 and now Siri and the voice memo can't hear me unless I hold the phone to my mouth literally shout into the mic.  Anyone else have the same problem?  I think it's just the iOS update.

  • IPhone music is distorted

    Hello.. I've been an iPhone owner for about two weeks now and I am on my second iPhone. The first one had an issue where the back light would not stop flickering. My current iPhone has a problem where if I change the equalizer settings to anything ot

  • 1:N mapping for ZALEAUD01: Cannot produce target element /ns:0Messages

    Hi, I am working on a scenario where my sender MT is ZALEAUD01 (idoc occurance 1..1) and receiver MT is a xml file (Root Node occurance 1..1). I want to generate the number of files based on the occurance of a particular node (E1STATE). I am using a

  • How to use objects in Pro*C++

    Hi, I have created a table as follows: =========================================== CREATE TYPE pds_rec_type1_obj AS OBJECT ( service_mode char, total_fuel_dollars NUMBER(7,2), total_fuel_litres NUMBER(7) CREATE TABLE pos_product_discount ( outlet_id

  • Snow Leopard's Default Gamma & Color Correcting for Pre Press in Photoshop CS4

    After searching the forums I thought I would start my own thread on this subject. I have Photoshop CS4 and InDesign CS4 and I have continued to color correct, for pre press, in OS 10.4.11 Tiger with the 1.8 Default Gamma and 6500 color tempurature, u