problem with getting some xml UTF-8 characters

Hello

Please help me solve the following problem. I need to parse the XML string that contains the currency symbol (for example pound sign, see the code example). In the result of the variable currSign contains '? What's wrong?

{} public static Sub test()

try {}

String data ="" +

"0.00";

ByteArrayInputStream is = new ByteArrayInputStream (data.getBytes ());

DocumentBuilderFactory plant = DocumentBuilderFactory.newInstance ();

DocumentBuilder builder = factory.newDocumentBuilder ();

Doc document = builder.parse (is);

Root element = doc.getDocumentElement ();

String currSign = root.getAttributes () .getNamedItem ("unit"). getNodeValue();

}

catch (Exception e) {}

}

}

Ah. I think I see the problem. You want to convert the string into a byte array data using the version without getBytes() argument. Which uses the default encoding (which is ISO-8859-1). You must call getBytes ("UTF-8") or specify ISO-8859-1 for the xml declaration.

Tags: BlackBerry Developers

Similar Questions

  • Someone at - he had or having problems with getting nVidia NVS 450 working resolution?

    Hi all

    We got a new C20 with a nvidia NVS 450 card - and a $ monitor. The C20 has Windows 7 preinstalled; the out-of-the-box resolution is 640 x 480 and we couldn't make it go higher than that! The $ and the video card are connected via the DisplayPort cable that came with the unit. After you have reinstalled the video card driver that comes with the unit (on a CD containing drivers for Windows and Linux), we could never get to go beyond 640 x 480 resolution. We left thinking that it must be a quirk with Windows 7. We were going to install Linux on the C20 anyway, so we moved on this.

    We installed Fedora 14 (64-bit) install the video driver nvidia who was on the CD and cannot get the display resolution greater than 640 x 480. After a few days of tests n errors referring to various online forums, we have successful get resolution up to 800 x 600, but not the expected 1900 - something resolution the $ and video card holders.

    Someone at - he had problems with getting the resolution of the video card to work? If so, were you able to solve the problem? We thought we would start here instead to call Lenovo support first, because usually technical questions, we get smarter than over-the-phone responses. Also, waiting for answers on a forum is less frustrating than the vote by phone.

    Chris

    Thank you for your response.

    I had the chance to get their hands on another monitor, and when I plugged that, I got the full resolution. After a lot of testing, I decided that it was a faulty monitor and it had nothing to do with the video card. I finally got a replacement screen for the one who wasn't giving me the full resolution.

    Subsequently, I went ahead and got the latest drivers nvidia on their Web site. Everything works fine now.

  • So, my cousins both got two netbooks for Christmas so I took it upon myself to put in place. However, I seem to have problems with getting Homegroup to work.

    original title: incorrect Homegroup password

    So, my cousins both got two netbooks for Christmas so I took it upon myself to put in place. However, I seem to have problems with getting Homegroup to work.

    All computers:
    Have enabled IPv6
    Use Microsoft Security Essentials with the last update
    Are connected to the same router (Linksys WRT54GX2)
    Have no other third-party firewalls or AV installed and have been neatly eliminated via their respective tools when they had their
    Can be seen in the network and can access any other files via 'network '.
    Have the correct date and time and are all in sync with time.nist.gov.
    Have the same network sharing settings (network discovery on, files and printers sharing folders public, sharing, streaming, wide, 128-bit encryption, sharing password protected, to allow windows to manage the homegroup connections)
    Network is set at home, not in public

    The computer that has implemented the homegroup is connected via ethernet to the router while other computers use to access the router 802.11 g I tried to delete and redo the residential group as well.

    Despite all this, it is said that the homegroup password is incorrect for both netbooks (where it says it has encountered an error). I realize that it is case sensitive and I entered the password correctly. I also ran the resolution of the problems of the homegroup on all 3 machines and still no luck. I also tried to change the password and restarting of machines.

    Any suggestions? I was _really_ hoping it will work right out of the box. Maybe it's something with the router? I don't really know. Any help is appreciated. Merry Christmas! : D

    Hello

    check out this link.

    http://Windows.Microsoft.com/en-us/Windows7/why-cant-I-create-a-HomeGroup

    http://Windows.Microsoft.com/en-us/Windows7/create-a-HomeGroup

  • Im having problems with getting my sound to work on windows 7 RC 7100 32 bit I tried to use 2 soundcards.

    original title: Audio does not work

    Problems of sound in windows 7

    Hey all. Thanks in advance for any time you spend to help me.

    Im having problems with getting my sound to work on windows 7 RC 7100 32 bit
    I tried to use 2 soundcards.

    1: creative X - FI Extreme
    for creative people, I tried using drivers creative Beats, creative version drivers and vista 32-bit drivers with no luck.

    2: its integrated with Intel DP35DP motherboard card
    7 drivers are available for intel sound I used vista 32 bit since no windows drivers.

    I have 3 device failed in the Device Manager. Simple PCI controller, peripheral Audio communications of high definition, Microsoft makes confidence audio drivers.

    the 3 rooms of this note.

    Windows cannot load the driver for this hardware device. The driver may be corrupted or missing. (Code 39)

    with or without pilots the warrning does not change.

    System Spec.

    Card mother Intel DP35DP
    3 GB ram
    Core 2 duo E8400 with
    ASUS Nvidia Geforce 8800gt
    Creative X - FI extreme pci / Intel integrated audio system
    Termaltake 600 watt Toughpower supply
    Pioneer dvd Sata burner

    Managed to solve this problem by installing the 64-bit windows 7 instead of 32 bits.

    not sure why the sound failed. but now its fixed.

  • Problem with dynamic arrays, XML and JavaScript patterns

    With the applied XML schema my JavaScript does not correctly work when it is added a 2nd row at my dynamic table. Instead of an added empty line 1st row data is copied on the 2nd line and if you change the data in the 2nd row it modifies data in the 1st row also. It works fine if the XML schema data connection is well removed.

    No idea what I can do to get this working with the schema that is applied in the same way, it works without the schema?

    Thanks for your help,

    Brian

    There you go. Its not a problem.

  • I am having problems with getting my Outlook Express 6 to hang with my hotmail account.

    I get an error Ox8OOcccOD code, hotmail server is not found.  I had windows mail and had problems with my computer and my son uninstalled and reinstalled everything on my computer, and Outlook Express 6 has been installed.  Can someone give me a help as how to connect to hotmail account right.  I tried almost everything.

    Thank you

    Hello

    You can check these links:
    How to configure Outlook Express to use a Hotmail account
    http://support.Microsoft.com/kb/220852
     
    You receive an error message when you use Outlook Express or Outlook to access your Hotmail account
    Troubleshooting error messages that you receive when you try to send and receive e-mail in Outlook and Outlook Express
  • Problems with getting an interactive E-book created in ID CS6 to work with ID CC 2015

    Hi all

    I have a problem with an e-book that I created with Indesign CS6.  He has slideshows, blocks of video image, zoomable and scrolling text boxes between assets. It was never published but was over and I was able to do work through the constructor app let me see on Viewer Adobe on my Ipad. Here, everything works perfectly. Since then, I changed cs6 to 2015 for CC and now I have problems.

    I wan't to make some corrections to the origianl design and content and publish correctly. When I open the various documents that the book consists of (a document PR. Chapter of the book) it is no longer the option to create the app that I used in the old CS6. When I export a chapter the ibooks app opens and opens the chapter, well but some interactive things do not work: my slide show does not automatically change the slide it's supposed to, I also have a zoom in the window of a drawing I did and all the boxes scrolling with text and drawings do not work either. Video clips to work however. When I check the slide show options in the document, they seem to look ok. Now my questions are:

    How do these things work?

    What is the difference in the CS6 and CC 2015?

    Can someone direct me to some tutorials that can help me solve the problem?

    I really hope someone can help I would like to finish my project I've been working on for a long time...

    Thanks in advance

    Berit

    This isn't an EPUB, it's a DPS folio. Some of the effects of work, some do not, but the overlays Panel won't be any help.

    You can add scrolling images with this: universal scrolling frames | Ajar Productions

    Pan and zoom is not supported and are neither self running slideshows. If you can give us more details, perhaps alternatives can be provided but be very specific as to how you plan on the publication of this.

  • Newbie problems with getting a local server from the BFC set

    It started in another post by me about what I thought, it was a problem with port 8500. I had looked at the getting started with video CFB, and on that, he used localhost as the server name and as the host name. He then assigned port 8500 as the Port of the Web server.

    When I do that it is in the windows as stopped servers. If I try to start it the error I get is

    'Start-up localhost' has encountered a problem

    Make sure that the server is not already running or any application does not use the port of the Web server.

    So as an experience, I changed the port 80, because the admin page doesn't work in http://127.0.0.1/CFIDE/administrator/index.cfm

    The server at the bottom of the BFC window then shows a server running.

    I create a small "Hello World" index.cfm page and when I touched one of the tabs of the browser, Firefox and IE in my case, I get the following error.

    Error during preview generation:

    There is no server configured for the project myproject , to which belongs the index.cfm file. Configure a server in ColdFusion in ColdFusion server settings before you continue.

    What Miss me?

    Thank you

    Dennis

    You must specify the BFC BFC server must use in order to preview the file.

    If you need to associate a server with this project. To do this, right-click on the project-> properties-> ColdFusion server settings.

    Here in the "Server" dropdown list, select the server that you have added in CFB.

    Once this is done, make sure that your project is in the root of the document from the server in your case, that could be the Inetpub\wwwroot.

    Once this is done, the preview should work.

    -Bhakti!

    Adobe ColdFusion team

  • Problems with sending some e-mail from abroad.

    Please bear with me on this problem as I am not very intuitive in regards to the accounts. POP, etc. etc.

    I have a system Windows 8 and use the BT Internet to send messages without any problems. But today I tried twice to send the same e-mail to a gmail account in America with two clips of very small size but in a few minutes, he returned with an error message stating that the e-mail could not be sent my e-mail address and to contact my ISP (BT). I have in the past received emails from that same address with no problems.

    I contacted BT and they checked my system and everything works fine and there is nothing else they can do, I can send other emails to colleagues in the United Kingdom without any problem.

    My wife sent a test message to the gmail address, and it was received without a problem so I'm assuming that the fault lies somewhere on my PC.

    Your help would be very appreciated.

    Hi Steve,.

    1. Your wife uses BT E-mail account to send emails?
    2. Are you facing problems with the other recipient?
    3. You use mail application?

    Please return with the required parameters so that we can better help you.

  • Problems with db/task.xml

    Hello

    When saving a custom scheduled task, I used weblogic utility to import and export the task.xml at MDS file.
    At first, I exported the file/db/task.xml task.xml, up-to-date with my tasks details custom set. And then imported it back to MDS by using the weblogicImportMetadata utility.
    Updated the weblogic.properties file to change the to and from places too.

    The import was successful. To check the file, I exported the file again and found that the file was in the State it had before the update.
    Also, when I checked in MDS_PATHS there are several copies of/db/task.xml.

    What I'm missing here? How can I make sure that the file is properly updated.

    Thank you
    Stone

    Published by: stone on November 23, 2012 10:02

    1. how the task.xml file is related to plugin.zip

    Scheculded task xml a tag called "oracle.iam.scheduler.TestScheduler" that defines the java class name. Now, plugin.xml also have the tag ' that define the java class is how the task.xml file to locate class java via plugin.zip.

    2. If we create files with different names, how IOM identifies what file * task.xml refer?

    IOM identify automatically. Only thing to consider is that the name of the file must be the same as the name of the scheduled task, with the extension .xml. You must import the scheduled task in the Oracle Identity Manager MDS/DB schema namespace.

    So, always create a custom file to a custom scheduled task. It will be easy to maintain & manage.

    For detailed steps, find the links above

  • Problem with XMLSerialize / indented XML

    My problem is that my XML output is only a line like:
    <? XML version = "1.0" encoding = "ISO-8859-15? > < rss version = "2.0" > < channel > < title > Test < / title > < / channel > < / rss >

    IAM want to export xml like this:
    <? XML version = "1.0" encoding = "ISO-8859-15? >
    < rss version = "2.0" >
    .. < String >
    ... < title > Test < /title >
    .. < / channel >
    < / rss >


    I heard from xmlserialize that should be used like this:
    Select xmlserialize (DOCUMENT xmltype (' <? xml version = "1.0" encoding = "ISO-8859-15"? > < rss version = "2.0" > < channel > < title > Test < /titre > < / channel > < / rss > ')) twice;

    but its no change in my outings.
    Can someone help me?

    Published by: Oliver L the 07.11.2008 14:15

    You are interested in the concept called "pretty printing".
    http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14259/xdb04cre.htm#sthref469

    If you're on 11, you can use one of the examples posted by mdrake to Re: generation of XML using XMLGEN

    The concept of printing enough has been discussed in this forum before and I think that the SQL and PL/SQL forum as well.

    select xmltype('Test').extract('*')
     from dual
    

    The question to ask is "do you really need to? Compliant systems do not care if the XML of entry is a string unique or nice print.

  • Problem with keyboard: some keys return two, not one, characters

    I have a MacBook Air 11 '' mid-2012 128 GB SSD model running OS X Yosemite 10.10.5 and my keyboard has developed a strange problem occultation key repeat.  Whenever you press the "3" button, the system generates thus simultaneously a '3' and '6 '.  This motif is repeated this diagonal of the keyboard down, i.e.

    '3' generates a '3' and '6 '.

    'e' generates an 'e' and a 'y '.

    "d" generates a "d" and an "h".

    'c' generates a 'c' and a "n".

    The reverse is also true, that is, a '6' generates a '3' and so on.  Curiously, the sign '=' generates a character "§" as well, a special character generated by keeping down option and pressing "6".

    (This combo generates a ' § ' and a ' £', hidden under the '3'.)

    The same problem occurs when you use the Shift or Control keys as modifiers.

    I can work around the problem by using either a connection wireless Bluetooth or wired USB keyboard (like using the "Keyboard Viewer" option under "System Preferences"), but that kind of defeats the point of having a laptop as a MacBook Air, Yes?  The problem is intermittent, but becomes very annoying.  (Try to type a password with such a mess!) It sounds like a mechanical problem requiring a possible replacement of the sale wholesale (and), but I hope someone out there can have a software or another solution.  Thank you!

    Raoul_Duke wrote:

    I can work around the problem by using either a wireless or wired USB Bluetooth keyboard

    That certainly points to make it a hardware problem.  It is difficult to imagine a software problem that would not affect both internal and external keyboards.

  • some problems with get-esxcli

    Hi, I'm trying to write a script to configure esxi servers who will find the exact number of iscsi software adapters vmhba and then add the vmknics them to configure multiple paths (i.e. esxcli swiscsi nic add - n vmk2 d vmhba37, but the number of vmhba will vary between servers).

    Initially, I want just the network cards connected to the adapter to a server that is already configured for test purposes, so I ran the list

    # Find the correct vmhba of iscsi software adapter

    $HBANumber = get-VMHost $vmhost | Get-VMHostHba | where {$_.} {Model - like "adapter software iSCSI"} | Select the device
    # list the nic with iscsi adapter
    $esxCli = get-EsxCli - Server $vmhost
    $esxCli.swiscsi.nic.list ("$HBANumber")

    I got the error:

    The remote server returned an error: (500) internal server error.

    On line: 1 char: 25

    + $esxCli.swiscsi.nic.list < < < < ($HBANumber)

    + CategoryInfo: InvalidOperation: (:)) [], RuntimeException)

    + FullyQualifiedErrorId: MethodInvocationException

    I worked on that my line of $HBANumber in my script returns another text than just vmhbaxx:

    [vSphere PowerCLI] C:\Program Files\VMware\Infrastructure\vSphere PowerCLI > Write-Host $HBANumber

    @{Device = vmhba39}

    How can I fix so that the first line of my script returns only vmhbaxx and not the @{device = party?}

    Thank you

    You want just the value (vmhba39) of the object.

    Try to change this line to

    $HBANumber = get-VMHost $vmhost | Get-VMHostHba | where {$_.} {Model - like "adapter software iSCSI"} | %{$_. Device}
    The value returned in $HBANumber can be a single value or an array of values (if you have more than 1 defned iSCSI adapter).
    If you have a table, you must call EsxCli in a loop
    $HBANumber | %{
    $esxCli.swiscsi.nic.list("$_")
    }
    If you want a script that manages a single HBA such as a table, you could do
    $HBANumber = @(Get-VMHost $vmhost | Get-VMHostHba | where {$_.Model -like "iSCSI Software Adapter"} | %{$_.Device})
    

    In this way force you, even if it's a single HBA, the line to always return an array.

  • Problem with getting communication with old instrument GPIB-ENET/100

    Hello!

    I'm trying to get my program in VB.net to communicate with an older instrument (Infratek 305 A, measure of power) via a GPIB-ENET/100 device.

    The manual of the instrument does not say what GPIB standard, it supports, but the instrument is detected by the measurement and Automation Explorer.

    Detected by that I mean that MAE has detected an instrument located on the right GPIB address, but indicated identification is the output measure instrument string

    instead of the name of instrument (as shown for some more recent instruments of Agilent).

    When I run my application, I followed the communication with NISpy.

    Configuration of the device seems to work and I present only once in the program.

    The problem is reading data from the instrument. Whenever I read the data, I get a correct string of the instrument. But the problem is

    I get the same data in two consecutive and all readings first after that I get new data and also these new data are received in two consecutive readings.

    According to the manual of the instrument the instrument generates the data as follows:

    "A row of data ends with CRLF. The instrument can send multiple rows of data. "When all of the data transfer is complete the EOI (end or identify) is sent.

    My endpoint settings are:

    Send EOI to write complete: YES

    Terminate read on EOS: No.

    EOS byte: 2

    8 bit EOS compare: YES

    Define EOI with EOS on write: No.

    How can I configure the GPIB-ENET/100 to work with my instrument?

    Here are som NISpy logs:

    # Configuration #.

    61 ibwrt(UD3, "C0C2C4C8..", 10 (0xA))
    PID: 0x0000113C Thread ID: 0x000008B4
    Departure time: 13:54:43.671 call duration 00:00:00.079
    ibsta: 0 x 100 iberr: 0 ibcntl: 10 (0xa)

    62 ThreadIbcntl()

    PID: 0x0000113C Thread ID: 0x000008B4
    Departure time: 13:54:43.750 call duration 00:00:00.000
    ibsta: 0 x 100 iberr: 0 ibcntl: 10 (0xa)

    63 ibwrt(UD3, "K0K3K5K9..", 10 (0xA))
    PID: 0x0000113C Thread ID: 0x000008B4
    Departure time: 13:54:43.765 call duration 00:00:00.125
    ibsta: 0 x 100 iberr: 0 ibcntl: 10 (0xa)

    64 ThreadIbcntl()
    PID: 0x0000113C Thread ID: 0x000008B4
    Departure time: 13:54:43.890 call duration 00:00:00.000
    ibsta: 0 x 100 iberr: 0 ibcntl: 10 (0xa)

    65 ibwrt(UD3, "F14F18F24..", 11 (0xB))
    PID: 0x0000113C Thread ID: 0x000008B4
    Departure time: 13:54:43.890 call duration 00:00:09.250
    ibsta: 0 x 100 iberr: 0 ibcntl: 11 (0xb)

    66 ThreadIbcntl()
    PID: 0x0000113C Thread ID: 0x000008B4
    Departure time: 13:54:53.140 call duration 00:00:00.000
    ibsta: 0 x 100 iberr: 0 ibcntl: 11 (0xb)

    ### LU ###

    437 ibrd(UD3, "*AC/1.0A480V/...", 1024 (0x400))
    PID: 0x0000113C Thread ID: 0x000008B4
    Departure time: 13:58:52.484 call duration 00:00:00.094
    ibsta: 0 x 2100 iberr: 0 ibcntl: 225 (0xe1)

    438 ThreadIbcntl()
    PID: 0x0000113C Thread ID: 0x000008B4
    Departure time: 13:58:52.578 call duration 00:00:00.000
    ibsta: 0 x 2100 iberr: 0 ibcntl: 225 (0xe1)

    439 ThreadIbcntl()
    PID: 0x0000113C Thread ID: 0x000008B4
    Departure time: 13:58:52.578 call duration 00:00:00.000
    ibsta: 0 x 2100 iberr: 0 ibcntl: 225 (0xe1)

    Hello!

    I don't have the opportunity to test with other controllers.

    However, I found a solution to my problem.

    The instrument should output 4 lines of data.

    L1 - line with comments

    L2 - line with current values

    L3 - line with the values of voltage

    L4 - line with power values

    The first line of the reading stops the instrument of implementation of additional measures.

    The measurements in the instrument began reading the last line of data (L4)

    The problem was that the instrument for a reason any also released a fifth line, which was empty.

    Read this line 5' th stopped the instrument again.

    By configuring the HW to finish reading on EOS, with EOS PMQS, the value byte, I could read the

    buffer of the instrument with a line output instead. This way I could read just L1 - L4

    and the instrument could work again.

    Next time I should read data from the Instr. first of all, I would like to read the empty line, then

    L1 - L4.

    Why the outputs Instr. an additional empty line will be left not resolved.

    My problem is solved.

  • HOW TO SOLVE MY PROBLEM WITH MICROSOFT OPEN XML CONVERTER. WHEN AN E-MAIL CANO'T OPEN THE ATTACHMENTE

    Every time to enter an e-mail address, when have an attachmente I have intention to open but bring a dialog box telling me: 'Microsoft Open XML Converter.  Click here to open bring another dialog box telling me: "Save."  In the final, a small dialog box tell me: not recorded in any file. What should I do?

    Hi MarioVidal

     

    1. what email program are you using? What is windows live mail, Hotmail, Gmail, etc.?

    2. meet the issue only with some specific files types with come as attachments or with each of them?

    3. during how long have you had this problem?
    4. the problem occurs for all e-mail programs?


    Let us know the answers to help you best.

Maybe you are looking for

  • HP pavilion 2127 g6: CPU hp Pavilion replacement go

    interested to know if it's possible replacement processor on a computer hp laptop pavilion g6 2127 with amd a6-4400 to amd 10 5750 m

  • No boot device message on my Satellite P850 - 30 p

    my laptop model is: SATELLITE P850 - 30 p When I turn on my laptop, it displays the text something very similar as following: "Intel UNDI, PXE - 2.1 (build 082)Copyright (C) 1997-2000 Intel Corporation For Realtek RTL8101E/8102E PCI - E Ethernet Cont

  • More print impresi n

    Patrick e're hp D2460 e prints lentamente además me dice los cartuchos tienen poca tinta. ESO paso al recargar los cartuchos again, quiero saber como various este impasse, gracias

  • 5810 t drivers

    I just formatted my aspire 5810 t and reloaded Windows Vista family premium, I need the drivers for everything now can someone help me with drivers to download and where to find it please?

  • Concerns about RAM

    Hello everyone well if I have hp pavilion dv6 6c19tx there HM65 intel chipset board that ive met only support memory live DDR3 1333 mhz bus and yet my stock ram that came from the hp is 1600 mhz why is - this? According to CPU - Z, it's a PC3-12800 (