DOMParser changing characters problem...

Hi,
I want to parse a String into an XMLDocument. Therefor I use this code:
  StringReader sr = new StringReader(rset.getString(1));
  DOMParser parser = new DOMParser();
  parser.parse(sr);
  xml = parser.getDocument();The String that will form the StringReader is:
[text]
<qarticle xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.qualogy.com:8888/qcontent/xsd/qarticle.xsd" id="1488" lastUpdated="2005-05-12" lastPublished="" author="">
<pageReference>33,1</pageReference>
<pageReference>33,36379</pageReference>
<category>nieuws</category>
<category>main</category>
<category>vacature</category>
<title>titel</title>
<content>
<html>
<body> één
twee
drie
</body>
</html>
</content>
</qarticle>
[text]
After the parsing the "é" are changed to "é".
I tried changing the characterset with
  Charset charset = Charset.forName("UTF-8");
  CharsetEncoder encoder = charset.newEncoder();
  ByteBuffer bbuf = encoder.encode(CharBuffer.wrap(xmlString));
  Charset cs2 = Charset.forName("windows-1252");
  CharsetDecoder decoder = cs2.newDecoder();
  CharBuffer cbuf = decoder.decode(bbuf);
  System.out.println("Door Charset "+cbuf.toString());
  sr = new StringReader( cbuf.toString())But this has no effect..
Any ideas?

Here is one way to do it.
String name = "james"
Get the first character:
char first = name.charAt(0);
Make the char uppercase:
char first = Character.toUpperCase(first);
replace the first character:
StringBuffer nameBuffer = new StringBuffer(name);
nameBuffer.replace(0, 1, new String(first));
name = nameBuffer.toString();

Similar Messages

  • Hello, Trousseau session asks the password many times in a day.  What to do to change this problem? Mfrance iMac, Mac OS X (10.7.3)

    Hello,
    Trousseau session asks the password many times in a day.
    What to do to change this problem? Mfrance
    iMac, Mac OS X (10.7.3)

    ...I wonder how your question solved their question.

  • How to enable "Change characters to Chinese Traditional" and "Change characters into Chinese Simplified" ?

    I am a Taiwanese and usually use the feature of "Change characters into Chinese Traditional" or "Change characters into Chinese simplified" . Before I update Pages/Numbers/Keynotes , these features works well . I can transfer Chinese characters into Traditional or Simplified in the menu of Pages -> services .
    But After I upgreade OS to Mavericks , and Pages to 5.0 , Numbers to 3.0 and keynotes to 6.0 , the features are removed by Apple. I just call Apple expert service in China and they said : The features confirmed to been removed .
    Is there any expert can teach me recover the feautre manually or down-grade to old version of Pages/Numbers/Keynotes ?
    I need the features ..... Please help !!!!!!
    Best Regard, Tommy
    <Email Edited by Host>

    Services is broken on the new Pages, you could use TextEdit instead until Apple produces a fix.  To encourage the latter, tell them you want this back via
    http://www.apple.com/feedback

  • My iPhone 5 says unable to connect to network. I have tried all the trouble shooting...resetting phone, router... No change. Problem occurs everywhere not just at home. Any suggestions?

    My iPhone 5 says unable to connect to network. I have tried all the trouble shooting...resetting phone, router... No change. Problem occurs everywhere not just at home. Any suggestions?

    AmishCake wrote:
    Have you tried restoring your softwareyes
    yes I have

  • Non-English characters problem

    I am using Flash 8. I am trying to create foreign language
    versions of my flash program, and have been using Embed on the
    properties area with limited success. For example, I am trying to
    display Greek characters using Static text and Arial font. There is
    no embed option for this. However, when I run the swf, the correct
    characters appear for some of the texts and some are just blank.
    Very confusing, particularly as I have checked and they have the
    same properties.
    Also, I am trying to display text using actionscript, through
    a dynamic text field that I can Embed the greek characters. Again,
    I am experiencing a similar problem. I've even tried to use the
    special char codes for the letters, and that doesn't make much
    difference.
    Does anyone have any ideas about what I could be missing
    here? It is getting infuriating.
    Thanks!!!!

    9113060,
    > I have ZCM 11 SP1. In remote management I can input on remote device
    > only English characters.
    > When I change keyboard layuot to Russian - no input at all. But I need
    > Russian keyboard working. Help, please.
    >
    > Management device is Windows XP SP3 box, admin device - Windows 7 SP1
    > and Windows XP SP3 boxes
    Need more info here. I just tested it on Swedish and it works just fine,
    but when you say "When I change keyboard layuot to Russian" does that
    mean that the default on your machine or the target machine is not
    Russian?
    - Anders Gustafsson (NKP)
    The Aaland Islands (N60 E20)
    Novell has a new enhancement request system,
    or what is now known as the requirement portal.
    If customers would like to give input in the upcoming
    releases of Novell products then they should go to
    http://www.novell.com/rms

  • Special characters problem in navigation model

    Hi dears,
    I'm using Jdev 11.1.1.6.0 and trying to develop a portal application. In the app, i created a new nav. model with turkish characters. (For example "ş" or "İ" .) In runtime, i see "?" characters instead of these characters.
    You can see from this : http://imgur.com/Bwqxc
    I searched this problem in the previous threads; but they are not the same with my problem. And all pages' encoding is UTF-8. Does anybody help me to overcome this problem?
    Thx in advance.
    Erdo
    Edited by: erdo on 20.Ara.2012 16:23

    Hi Jiri,
    Firstly thanks for reply. I applied your suggestion before writing this this thread, controlled again. I saw the tags that includes specail chaaracters, and i changed them. it works :)
    Old version :
    <url factoryClass="oracle.webcenter.portalframework.sitestructure.rc.UrlResourceFactory"
    visible="#{true}" id="url26">
    <attributes>
    <attribute value="?leti?im" isKey="false" attributeId="Title"/>
    </attributes>
    </url>
    Correct version :
    <url factoryClass="oracle.webcenter.portalframework.sitestructure.rc.UrlResourceFactory"
    visible="#{true}" id="url26">
    <attributes>
    <attribute value="İletişim" isKey="false" attributeId="Title"/>
    </attributes>
    </url>

  • National characters problem

    Hi.
    I'm using AE on XE 10.2.0.1.0
    I have problem with typing national characters f.e. in updatable Report Attributes Column Heading (Custom). If i type name for heading "Ilo&#347;&#263;", then push "Apply changes", name are saved without national characters, "Ilosc".
    Why it is happenig ?
    Should i change settings in Application ? Or on database ?
    Should i use another Browser (currentlny SeaMonkey) ?
    I have download "Oracle Database 10g Express Edition (Western European)".
    Should I download and use "Oracle Database 10g Express Edition (Universal)" ???
    My APP globalization parameters:
    Application Primary Language      : Polish (pl)
    Application Language Derived From: Application Preference (using FSP_LANGUAGE_PRFERENCE)
    Automatic CSV Encoding: no
    My DB NLS settings :
    NLS_CALENDAR     GREGORIAN
    NLS_CHARACTERSET     WE8MSWIN1252
    NLS_COMP     BINARY
    NLS_CURRENCY     zl
    NLS_DATE_FORMAT     RR/MM/DD
    NLS_DATE_LANGUAGE     POLISH
    NLS_DUAL_CURRENCY     zl
    NLS_ISO_CURRENCY     POLAND
    NLS_LANGUAGE     POLISH
    NLS_LENGTH_SEMANTICS     BYTE
    NLS_NCHAR_CHARACTERSET     AL16UTF16
    NLS_NCHAR_CONV_EXCP     FALSE
    NLS_NUMERIC_CHARACTERS     ,
    NLS_SORT     POLISH
    NLS_TERRITORY     POLAND
    NLS_TIME_FORMAT     HH24:MI:SSXFF
    NLS_TIMESTAMP_FORMAT     RR/MM/DD HH24:MI:SSXFF
    NLS_TIMESTAMP_TZ_FORMAT     RR/MM/DD HH24:MI:SSXFF TZR
    NLS_TIME_TZ_FORMAT     HH24:MI:SSXFF TZR

    N'<national symbols>', being part of an SQL statement, will be converted to the database character set (WE8ISO8859P1) before being parsed. Only if the client and the database are both 10.2 or higher, the client can encode the literal appropriately so that it survives this conversion.
    In earlier versions, you can do the encoding yourself. Instead of the N'<national symbols>' literal use the UNISTR function: UNISTR('\xxxx\yyyy\zzzz'), where U+xxxx, U+yyyy, U+zzzz are Unicode code points of your national characters.
    -- Sergiusz

  • Form for password changing. code problem

    hi dears,
    i am using forms6i. i was making a form for password changing purpose. i've written this code this is successfully compiled but it is not changing the password. wil u plz tell me where is the problem.
    declare
         v_user varchar2(50);
         v_oldpassword varchar2(50);
         v_var2 varchar2(50);
         v_leng number(3);
    begin
         v_oldpassword := get_application_property(password);
         v_user:=user;
         v_var2:=upper(:password_old);
         if v_var2<>v_oldpassword then
         message ('Old Password Is Not Correct...');
         message ('Old Password Is Not Correct...');
         raise form_trigger_failure;
         end if;
         if :password1<>:password2 then
              message ('Typed Passwords Are Not The Same...');
              message ('Typed Passwords Are Not The Same...');
              raise form_trigger_failure;
         end if;
         v_leng:=length(:password2);
         if :password1=:password2 and v_leng<=3 then
         message ('Password Must Have Four Characters...');
         message ('Password Must Have Four Characters...');
              raise form_trigger_failure;
         end if;
         if v_var2=v_oldpassword and :password1=:password2 then
         FORMS_DDL('alter user ' || v_user || ' identified by ' ||:password.password2);
         message ('Password Is Changed... Please Restart The Oracle Applications...');
         end if;
    end;
    COMMIT;
    LOGOUT;
    thanks

    Hi dear,
    Please use this code to change your password:
    declare
    v_user varchar2(50);
    v_oldpassword varchar2(50);
    v_var2 varchar2(50);
    v_leng number(3);
    begin
    v_oldpassword := get_application_property(password);
    v_user:=user;
    v_var2:=upper(:password_old);
    v_leng:=length(:password2);
    if v_var2 != v_oldpassword then
    message ('Old Password Is Not Correct...');
    message ('Old Password Is Not Correct...');
    raise form_trigger_failure;
    elsif
    :password1 != :password2 then
    message ('Typed Passwords Are Not The Same...');
    message ('Typed Passwords Are Not The Same...');
    raise form_trigger_failure;
    elsif
    :password1=:password2 and nvl(v_leng,0) <=3 then
    message ('Password Must Have Four Characters...');
    message ('Password Must Have Four Characters...');
    raise form_trigger_failure;
    elsif
    v_var2 = v_oldpassword and :password1 = :password2 then
    FORMS_DDL('alter user ' || v_user || ' identified by ' ||:password.password2);
    message ('Password Is Changed... Please Restart The Oracle Applications...');
    end if;
    end;

  • Lenovo A806 - chinese characters problem

    Hello, i have little problem, when i try to unlock the phone screen (more exactly to slide up the wallpaper) and enter in contacts or message, chinese characters appears and when it's fully slided up, they automated get translated in the languages that is setted up.
    Contact
    Link to image 1
    and here is for the message
    Link to image 2
    And fully dragged:
    Link to image 3
    I also changed the ROM to multi-language, root acces, still the same problem.
    Moderator note: large image(s) converted to link(s):  About Posting Pictures In The Forums

    Hi Raoul
    The A806 Golden Warrior is intended solely for the Chinese (and possibly Taiwanese) market.(I don't have any info about a official ROW international multilingual firmware)
    Any firmware you are running must be a custom based an the stock Chinese firmware.
    Chinese firmwares don't have Gapps(Google services) and are only Chinese&English....
    .....The developer of the custom you're running didn't do a ''complete'' job in porting languages to the model.That's why you have this glitch.
    BTW.If you set it to English(I see you're using it in Romanian) the issue persists?
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as ''ACCEPT AS SOLUTION"! 
    Unsolicited PM's will not be answered! ....Please post your question/s in the appropriate forum board.
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество

  • Change characters in the background after upgrading BEX workbook

    Hi,
    I have just upgrade the Bex workbook from 3.5X to 7.0.  Functionally, it works fine.  However, one thing that irritates the end users is that when one opens the workbook, it immediately shows an Excel-sheet with change symbols, numbers and characters scattering from line 1 to 4 (like TRUE, FALSE, arrow-symbols etc).  Later on a variable screen pops up on top of this background.  The background will disappear only after the variable screen is filled and the result is finally displayed. 
    Does anyone comes across this issue?  Is there any way to get a clean background to start with?
    Thanks.
    Best regards,
    Zabrina

    Hi,
    The problem is due to the fact that we are using too low level of SAPGUI.  After upgrading the GUI level and patches, this together with other frontend problems such as missing role button, variants not showing and so on are dissolved.
    Best regards,
    Zabrina

  • Text fields special characters problem in forms created with ID

    Hi there,
    I'm creating form document with ID.
    The problem with special characters appears after exporting file to interactive pdf.
    When filling up text field, special characters (polish language specials in my case) are replaced by squares.
    I do not know if this is a ID problem (and I should set encoding during pdf creation somehow) or Acrobat/Reader problem (tried both and also in Polish or English versions).
    Some help would be appreciated.

    I am Creative Cloud User and downloaded fresh ID less than 2 hours ago.. And honestly the last thing I would think about was updating.
    But in fact - it was the problem.
    So thank you very much for help!

  • Macbook pro 13" late 2011 stuck up at apple logo and spinning wheel, changed HDD problem still exists

    i have a macbook pro 13' late 2011 unit and its not starting up, found out that the HDD was defective, but when i changed the HDD the problem still exists, what may be the problem?
    thanks

    Have you tried booting into the Recovery HD and running Disk Utility and checking to see if the HD needs repairs?
    Restart holding Command + r and at the recovery screen select Disk Utility. Then select Macintosh HD and click  on 'repair disk'. If anything gets altered click on repair disk again until you get a clean pass. Restart as normal from the Apple menu. More info here about the Recovery HD:
    http://support.apple.com/kb/HT4718

  • [CS3 JS] Find/Change Object Problem

    app.changeObjectPreferences = NothingEnum.nothing does not seem to clear the change object preferences for me.
    app.findObjectPreferences = NothingEnum.nothing works as expected, as do both app.findTextPreferences = NothingEnum.nothing and app.changeTextPreferences = NothingEnum.nothing.
    Does anyone else use the new Find/Change Object?

    Hello. I'm new here but it seems to be the only place where I can post this question to.
    I'm working in a C# application that uses InDesign CS3 scripting. I'm trying to create an index automatically from a tabbed list of words in a text file.
    As C# is a strongly typed language, I have to cast all objects to the right type. I'm having problems when I try to add the page numbers to the created index entries using the following code (I've used the CreateIndexEntry.jsx scrip as a starting point).
    //Find all occurrences of the word or set of words (the topic name)
    ((InDesign.FindTextPreference) app.FindTextPreferences).FindWhat = topic.Name;
    InDesign.Objects foundTexts = doc.FindText(System.Reflection.Missing.Value);
    It's supposed to be an Array of Text objects (InDesign.Text) but when I try to cast each object using this
    //Code is forced because I've tried everything here
    //Loop through each finding and add page numbers to topic
    IEnumerator textEnum = foundTexts.GetEnumerator();
    while (textEnum.MoveNext())
    object text = textEnum.Current;
    topic.PageReferences.Add((InDesign.Text)text, InDesign.idPageReferenceType.idCurrentPage, System.Reflection.Missing.Value, System.Reflection.Missing.Value);
    I got the following exception (translated).
    text is not an InDesign.Text object (Interfaces doesn't match)
    So the question is what object type should I use to cast each object resulting by calling the Document's FindText method.
    Every suggestion will ve very welcome.
    Thank You very much.

  • Special Characters problem in PI 7.1

    Hi,
    We have simple integration from R3 to JMS. from R3, idocs contain special characters, and they are getting converted in to different chanracters in integration engine. So making the output data currupted.
    I tested the same message in mapping test tool and the target message contains actual special charcters. Below is the example,
    Input: 
    i was thinking of using XMLAnonymizer, but the problem is in integration engine itself. I can see invalid output in SXMB_MONI.
    so could some one help me how can i fix this issue?
    Many thanks in advance.
    Regards,
    Prasad..

    Hello,
    Please check this document to sort out your issue:
    How to Work with Character Encodings in Process Integration (NW7.0):
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/502991a2-45d9-2910-d99f-8aba5d79fb42
    Br,
    Dzmitry

  • FileUpload and special characters problem

    Dear all,
    I currently encounter a issue with the FileUpload module.
    In my user form I have a FileUpload module to enable the user to upload a certificate file. The module itself is working fine but when the user controls an organisation containing a special character (like ñ), I cannot save the form because of the following error :
    ( ) - Warning: Parenthesized values in field 'accounts[Lighthouse].controlledOrganizations' do not match any of the allowed values.
    No controlled organisation is parenthesized.
    If I remove the FileUpload module, there is no error and I can save the user.
    If I change the type of the FileUpload module to Text, there is no error and I can save the user.
    I have two environments with this problem and two other without but the forms are identical, the java classes are the same. I do not see what would be able to cause this behaviour.
    Do you have any idea how to fix this ?
    It looks like the issue reported in this thread Problem using FileUpload Class Element/ encoding/ umlaut problem
    Thanks

    Try to use parameters instead hardcoding values in the queries:
    select * from user where lower(username)=?;
    and don't forget to lower the value from java side as well ;-)

Maybe you are looking for