Working with japanese and other char sets..

Hey all,
I primarily use XML Pull parsing becuase of its speed and my lack of need to validate a document.
One problem we are having is saving text input by a user into an xml when it is japanese characters. We can clearly see the japanese characters in the text field.
I have tried setting the encoding to utf-8, utf-16 and ucs-2. When I set it to utf-16, the output gets all garbled and it cant be read. Actually, in fairness, I am using a basic file writer and building up a StringBuffer with the xml I want, where I put the declaration tag at the top in and write it all out. At least on the mac, when I open the xml with textedit, I see a slew of japanese characters but no valid xml. Somehow it turns the entire file into japanese and not just the values within quotes.
What's the trick in writing xml out and reading it back in so that various languages can be saved and restored?
Thank you.

I am using a basic file writer and building up a StringBuffer with the xml I want,That isn't the trick. The trick is to use a FileWriter that has been set up to use the same encoding you put into the XML document's prolog. Just having the XML document declare that it's encoded in UTF-8 doesn't make it be encoded in UTF-8, that is your responsibility. Like this:Writer w = new OutputStreamWriter(new FileOutputStream(...), "UTF-8"));And make sure you have a text editor that can understand UTF-8 and also render Japanese characters properly.

Similar Messages

  • Working with Muse and other CMS outside Business Catalyst

    Hi!
    Well I have been using Adobe Muse and I love it so far, I have been experimenting with some animation on Edge and integrating it to Muse, also like it since I got rid of Flash players, and also has been looking at Business Catalyst. I like the last one very much but here is the thing... not all my clients are so convinced about that! They want to use their choice hosting service which is not Business Catalyst. And although it has pretty cool stuff clients want freedom of choosing something else. Is there any chance Muse will be able in a near future to integrate other CMS and let us designers to have that choice in an easy way?
    Thank you

    I am trying to attempt similar...and I too am looking for answers. If you solved it please let me know. I have been trying to utilize the tutorial listed above.

  • SMB under 10.7.6 doesn't work with Lexmark and others

    I understand that Apple has changed SMB -- and it is not incompatible with lots of applications and devices (e.g. Lexmark scanners than scan to Mac).  Short of going back to Snow Leopard, is there a way to get the "old" SMB to replace the 10.7.6 SMB -- or is there a prayer that Apple will "fix" this problem?
    Thanks,
    Jim

    You must configure the destination path through the Lexmark printer web page.
    http://www.lexmark.com/publications/pdfs/2007/x560/v8752703_en.pdf
    Page 78, "Creating an FTP address using the Embedded Web Server"
    At 6.d
    If the FTP server requires you to log in, enter the name and password in the appropriate fields
    Let's say
    Username Jim
    Password jimpassword
    At 6.e
    If you want to use, for example, a folder called Scanner inside your Pictures folder, into server path field type
    Pictures/Scanner
    If you leave it blank, scanned image goes to your home folder

  • How can I uninstall I.E. 11? and install I.E. 10? 11 does not work with Sharepoint and other applications

    Windows Technical Preview for Enterprise does not give me an option to uninstall I.E. 11 or it does not list it as an update in installed updates. HELP! I need to be able to work in Sharepoint!  Any help is appreciated.

    Hi astexas,
    I would add some information:
    Uninstall Internet Explorer 11 is possible, but install an Internet Explorer 10 is not an option in Windows 10 Technical Preview, due to this is no such update existed for Windows 10 Technical Preview.
    Alex Zhao
    TechNet Community Support

  • I can not get Firefox to play music backgrounds on pages in browsers it works in IE and other browsers but not firefox, what HTML or Jave script do I need too use to make them work?

    I'm having a problem with firefox playing background music on some sites, it works with IE and other browsers but not with fire fox, what html or java script do I need to add to the pages so that they play the music?
    I develop my pages in Front Page and I know that the music only works in IE, so if someone can tell me how to correct this problem as it is important as I use fire fox as my main browser.
    I thank you in advance

    If a website uses BGSOUND then it will only work in IE.
    BGSOUND is not compatible with other browsers like Firefox.
    * http://kb.mozillazine.org/Background_music_does_not_play

  • Looking for an app that works with Mac and iPhone that will set calendar reminders of birthdays in contacts.

    Looking for an app that works with Mac and iPhone that will set calendar reminders of birthdays in contacts.

    Hi ron1098,
    Try my application Dates to iCal. it runs on the Mac, but you can sync the calendar to your iOS device.
    See more about Dates to iCal here. It is £4 shareware with a 2 week demo.
    Best wishes
    John M
    As I sell software on my site and ask for donations, the Apple Support Communities Use Agreement requires that I state that I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • I am considering buying an iPad 3. I have an iMac with OSX 10.6.8. On the iMac I have many photos and work with iPhoto and Photoshop Elements on the computer. Can I interchange or transfer photos and other work from the iMac to the iPad? How?

    I am considering buying an iPad 3. I have an iMac with OSX 10.6.8. On the iMac I have many photos and work with iPhoto and Photoshop Elements on the computer. Can I interchange or transfer photos and other work from the iMac to the iPad? How?

    velma Monreal wrote:
    I am considering buying an iPad 3. I have an iMac with OSX 10.6.8. On the iMac I have many photos and work with iPhoto and Photoshop Elements on the computer. Can I interchange or transfer photos and other work from the iMac to the iPad? How?
    Yes you can. In iPhoto create a Album with the photos you want in it. You can drag them from your Events folder. In iTunes with your iPad connected go to Photos by cliking on your iPad. You can then select the album or events you want.

  • Internal Microphone not working with Quicktime and some other apps, yet it does for Skype.

    Internal Microphone not working with Quicktime and some other apps, yet it does for Skype. 
    Microphone works fine with Quictime on another mac, so I do know how to use it. The one where it is not working (A) had an external microphone and camera attached earlier, and indeed it does work with that external microphone, but not with the internal microphone selected; and (B) had RealPlayer installed previously.
    Any suggestions, please?

    Hi,
    Download Audio driver from here.
    Intructions how to install it in Vista/Win7.
    Extract this driver with Winrar.
    Open Device manager and expand the Sound, video and game controllers section.
    Right click on Either the High Definition Audio Device if you have the generic Microsoft drivers, or the Conexant High Definition SmartAudio 221 if you have older Conexant drivers and choose "Update Driver Software..."
    Click Browse my computer for driver software, then click "Let me pick from a list of device drivers on my computer"
    Click "Have Disk..." then Browse to the folder where the drivers were extracted  .......\V64 for 64-bit Vista/Win7. Click OK.
    Select one of the "Conexant High Definition SmartAudio 221" models in the list, there will be multiple identical entries.
    Click Next, and you're done.
    I'm not sure which one from the list will work for You.
    This drivers weren't test. So if You will try them and it will work for You let us now about.
    ** Say thanks by clicking the "Thumb up" icon which is on the left. **
    ** Make it easier for other people to find solutions, by marking my answer with "Accept as Solution" if it solves your issue. **

  • When is Apple going to start working with ADOBE and let us enjoy some videos and other things on our beloved iPads and iPhones?

    When is Apple going to start working with ADOBE and let us enjoy some videos and other things on our beloved iPads and iPhones?

    How totally clueless can one be?
    Apparently not more than you.
    Adobe has given up on mobile flash for any device. They announced this a while ago.
    They admitted mobile flash is a disaster and are jumping on the HTML 5 bandwagon.
    Adobe has moved on, why can't you?
    http://www.technobuffalo.com/mobile-devices/adobe-announces-the-end-of-flash-pla yer-for-mobile-devices/
    http://latimesblogs.latimes.com/technology/2011/11/adobe-to-end-mobile-flash-plu g-in-development.html

  • I don't want Adobe to open up and be selected immediately. I work with iPhoto and Ipages etc and preview which needs to be my main application for my work , but need adobe reader for other files... how can I do this please?

    I don't want Adobe to open up and be selected immediately. I work with iPhoto and Ipages etc and preview which needs to be my main application for my work , but need adobe reader for other files... how can I do this please?

    loopiloo1 wrote:
    I don't want Adobe to open up and be selected immediately.
    Sorry, I don't understand this - you don't want Adobe [Reader] not to open when doing what?  On what operating system?

  • Problem in working with Japanese data

    Hello,
    We have an application, which should work for both English and Japanese languages. Our application is working fine for English data but in case of Japanese, we are facing problems. In the application, there is a language setting, where the user can select either English or Japanese. This changes the language of the labels to English or Japanese. We are handling this thru' ResourceBundles. But the data that is entered can be independent of this. In English setting also, the data entered or diplayed could be Japanese. Now we are facing problems at vaious places -
    1. When we enter Japanese data and save it, it gets copied into the bean and if there is any error in the saving, the same data from bean comes back on the screen. This data doesn't appear properly in Japanese.
    2. When we try to retrieve the already saved data from database, it doesn't show poperly in Japanese.
    We are using our own 'toUnicode' function, which converts the data to Unicode before saving the data to database. Similarly, we have tried different encodings like SJIS / Shift_JIS / ISO-2022-JP at various places i.e. in 'Page' directive or in HTML Meta tag or various combinations of these two. Nothing is working reliably. Sometimes for some combination, data retained in the first case is correct but it can't be saved. Sometimes it works with Unicode, sometimes without Unicode. Some combination affects the Japanese labels as well. Otherwise the labels at least are displayed properly.
    The same code with just Shift_JIS setting in 'page' directive, worked well in IIS Server for both English and Japanese.
    What could be the problem in WebLogic? Does it matter if WL is installed on English or Japanese machine?
    Kindly answer ASAP, since the project is getting delayed.
    Thanking in anticipation...
    -Medha

    Hi,
    is there a difference in handling Japanese and Chinese chars? If not I
    might be able to give you some hints.
    Daniel
    -----Original Message-----
    From: JSB [mailto:[email protected]]
    Posted At: Monday, February 12, 2001 6:22 PM
    Posted To: internationalization
    Conversation: Problem in working with Japanese data
    Subject: Re: Problem in working with Japanese data
    Have u solved this yet, and how ?
    Medha <[email protected]> wrote in message
    news:[email protected]...
    >
    Hello,
    We have an application, which should work for both English andJapanese
    languages. Our application is working fine for English data but in case
    of
    Japanese, we are facing problems. In the application, there is a
    language
    setting, where the user can select either English or Japanese. This
    changes
    the language of the labels to English or Japanese. We are handling this
    thru' ResourceBundles. But the data that is entered can be independent
    of
    this. In English setting also, the data entered or diplayed could be
    Japanese. Now we are facing problems at vaious places -
    1. When we enter Japanese data and save it, it gets copied into thebean
    and if there is any error in the saving, the same data from bean comes
    back
    on the screen. This data doesn't appear properly in Japanese.
    2. When we try to retrieve the already saved data from database, itdoesn't show poperly in Japanese.
    We are using our own 'toUnicode' function, which converts the datato
    Unicode before saving the data to database. Similarly, we have tried
    different encodings like SJIS / Shift_JIS / ISO-2022-JP at various
    places
    i.e. in 'Page' directive or in HTML Meta tag or various combinations of
    these two. Nothing is working reliably. Sometimes for some combination,
    data
    retained in the first case is correct but it can't be saved. Sometimes
    it
    works with Unicode, sometimes without Unicode. Some combination affects
    the
    Japanese labels as well. Otherwise the labels at least are displayed
    properly.
    The same code with just Shift_JIS setting in 'page' directive,worked
    well in IIS Server for both English and Japanese.
    What could be the problem in WebLogic? Does it matter if WL isinstalled on English or Japanese machine?
    Kindly answer ASAP, since the project is getting delayed.
    Thanking in anticipation...
    -Medha

  • FaceTime no longer working with Yosemite and IOS 8.1

    I have used FaceTime flawlessly for some time with no issue.
    After I upgraded to Yosemite on my MacBookAir and IOS8.1 on 5S and iPad air, I've had a problem connecting.
    When I get a call, all the devices ring (as they should) but it will not connect on the first device I pick up on.  It says connecting
    but all the other devices keep ringing and finally it says I have a missed call.  The connection does not happen.  If I turn off
    all devices except one, it will work...... do we have a bug here??

    Thank you for responding to my issue.  I spent the better part of two hours trying to get this to work.  Bluetooth is enabled on all devices. Each computer is set in Preferences/General to allow Handoff.  All computers and iPhones are on the same WiFi network.  I toggled all of the major settings off and on.  Rebooted each of my computers several times. I finally conceded defeat.  Then my daughter asked to have a try at it.  She worked on the first MBP for about thirty minutes and informed me that she had gotten continuity to work.  And indeed, on her MBP late 2012 she is able to use the continuity features in both directions between her computer and her iPhone 6.  But it only works with Mail and Safari.  I asked how she accomplished this feat.  She said she turned off "everything" on her computer and iPhone (WiFi, Bluetooth, "Allow handoff" under Preferences/General) and then rebooted both the iPhone and the computer.  She then turned everything back on.  This worked for her.  So we tried the same thing on my MBP and iPhone 6.  Now continuity works partially. Email activity is mirrored on both the MBP and the iPhone regardless of which device initiates the continuity activity.  But Safari activity on the computer is mirrored on the iPhone but not in the opposite direction.  There is no continuity function for Pages in either direction.  The telephone connectivity works fine on all of my devices– 3 MBPs, Mac Pro, iPad Air, 2nd gen iPad and 3rd gen iPad.

  • Handoff not working with Yosemite and iOS 8

    I have three Macbook Pros in my household.  Two are mid 2012 models and the other a late 2012 model.  Each is supposed to support the handoff feature of Yosemite and ios8.  Everything seems to work properly between my daughter's late 2012 MBP and her iPhone 6.  But on the other two MBPs in our family the continuity feature does not work on either of them.  Receiving and sending calls works fine.  But the continuity does not work even though all three MBPs and all three iPhone 6 are on the same wifi network.
    I've tried all the suggestions that I could find.  Toggling off and on the various settings on the MBPs and the iPhones.
    John

    Thank you for responding to my issue.  I spent the better part of two hours trying to get this to work.  Bluetooth is enabled on all devices. Each computer is set in Preferences/General to allow Handoff.  All computers and iPhones are on the same WiFi network.  I toggled all of the major settings off and on.  Rebooted each of my computers several times. I finally conceded defeat.  Then my daughter asked to have a try at it.  She worked on the first MBP for about thirty minutes and informed me that she had gotten continuity to work.  And indeed, on her MBP late 2012 she is able to use the continuity features in both directions between her computer and her iPhone 6.  But it only works with Mail and Safari.  I asked how she accomplished this feat.  She said she turned off "everything" on her computer and iPhone (WiFi, Bluetooth, "Allow handoff" under Preferences/General) and then rebooted both the iPhone and the computer.  She then turned everything back on.  This worked for her.  So we tried the same thing on my MBP and iPhone 6.  Now continuity works partially. Email activity is mirrored on both the MBP and the iPhone regardless of which device initiates the continuity activity.  But Safari activity on the computer is mirrored on the iPhone but not in the opposite direction.  There is no continuity function for Pages in either direction.  The telephone connectivity works fine on all of my devices– 3 MBPs, Mac Pro, iPad Air, 2nd gen iPad and 3rd gen iPad.

  • I'm having problems with iPhoto and the facebook set-up.  Every time I attempt to do so it says an error has occured and try again later.  I have not seen a solution posted.  Therefore, how does one contact Apple to solve the problem?  I'm new to the worl

    I'm having problems with iPhoto and the facebook set-up.  Every time I attempt to do so it says an error has occured and try again later.  I have not seen a solution posted.  Therefore, how does one contact Apple to solve the problem?  I'm new to the world of iMac but I find it a bit frustrating trying to solve basic issues/problems:(

    For what it's worth, you posted this in 2011, and here in 2014 I am still having this same issue. Over the last two days, I have had to unlock my apple account 8 times. I didn't get any new devices. I haven't initiated a password reset. I didn't forget my password. I set up two factor authentication and have been able to do the unlocking with the key and using a code sent to one of my devices. 
    That all works.
    It's this having to unlock my account every time I go to use any of my devices. And I have many: iMac, iPad, iPad2, iPad mini, iPhone 5s, iPod touch (daughter), and my old iPhone 4 being used as an ipod touch now.  They are all synced, and all was working just fine.
    I have initiated an incident with Apple (again) but I know they are just going to suggest I change my Apple ID. It's a simple one, and one that I am sure others think is theirs. I don't want to change it. I shouldn't have to. Apple should be able to tell me who is trying to use it, or at least from where.
    Thanks for listening,
    Melissa

  • PC Webcam works with iChat and iSight

    Before I purchase a web cam for my PC I need to know if it will work with iChat and iSight. Will I need to install any third party software for my mac or PC?

    Hi Gene,
    You will need to make a choice between AIM and Trillian
    The AIM app is free but does not Audio only Chat to iChat users and has a very small pic.
    Trillian costs $25 for the Pro version to Video chat but has a Bigger pic and can do full screen. The Basic version can alos Audio only chat to iChat users. Trillian can also join other IM services.
    More info on setting up AIM on the PC http://www.ralphjohnsuk.dsl.pipex.com/page12.html and the XP Service Pack 2 firewall. The Firewall will need to have Trillain enabled though it as well if you use that.
    Ralph

Maybe you are looking for

  • MobileSync folder location

    I currently have to use my work laptop (XP machine) in order to use iTunes to sync my iPhone (my main machine runs Linux) and it works fine. The problem is that we have a 20MB limit on our profile space ('Documents and Settings' folder) as it gets sy

  • Airport Extreme Base Station

    Where can i buy the base station? I don't live next to a Macintosh store, and i cannot see the Airport Extreme on the internet, only the Airport Express - and i cannot order from the US website?? Very frustrating! G5   Mac OS X (10.3)  

  • How to run application on two machine?

    hi how can i run coherence test program on two machine, and what configuration need on two machine, so that i can see the sharing of cache. thanks praven jain

  • To wait or not to wait for BB10 device with physical keyboard

    Hello everyone. I'm really psyched about BB10 but am debating whether or not to buy the touch screen device at launch or wait for a Bold-lie device. I really dislike the softkeyboard on other phones but I've read the BB10 softkeyboard is beyond other

  • Sorting by multpple fields

    Why can't I sort by multiple columns at any one time: e.g. 1. by artist (abc) 2. date 3.date added... Why only one sort method at a time??