Webservice: Special characters not displayed correctly

Hi,
I'm facing a problem when retrieving informations via a webservice. I'm able to use it and data is retrieved but when there are special characters into the response they are not displayed correctly. Repsonse of the webservice is XML formatted.
It seems to be a charcter set problem, strange thing is that the response is ISO-8859-1 formatted, this charset should normally display special characters like (é à ...) correctly.
In my code I simply use an if_http_client object to use the webservice.
pv_result = pv_http_client->response->get_cdata( ).
Xml repsonse :
<?xml version="1.0" encoding="ISO-8859-1" ?>
<![CDATA[Eetcaf�/Steakhuis Baskent]]>
Should be Eetcafé
How can I specify a charset for the response object?
I did the same in .NET, where I can bypass this issue specifying the charset like this.
Dim reader As New StreamReader(oResponse.GetResponseStream(), System.Text.Encoding.Default)
Thanks a lot for your help.
Edited by: dom___35 on Dec 21, 2009 3:30 PM

I soved this by using get_data function of response object. Then converting this into ISO-8859-1 charset.
See code below.
DATA :  lv_encoding   TYPE abap_encoding,
          lv_conv       TYPE REF TO cl_abap_conv_in_ce,
          lv_x_string   type xstring.
  lv_x_string = pv_http_client->response->get_data( ).
    lv_encoding = '1100'.
    lv_conv = cl_abap_conv_in_ce=>create(
                          encoding = lv_encoding
                             input = lv_x_string ).
    lv_conv->read( IMPORTING data = pv_result ).

Similar Messages

  • German Special Characters not displayed correctly in RTF  using code

    Hi ,
    In my code we are using webdynpro method
    WDResourceFactory.createResource(
    byte[] data, String resourceName,WDWebResourceType
    Type)
    Here in our code we are implementing this as
    ITemplateElement templateEl = wdContext.currentTemplateElement();
    WDResourceFactory.createResource(
    templateEl.getReportData(),
    reportName.substring(0, reportName.lastIndexOf('.')),
    WDWebResourceType.RTF); reportName.lastIndexOf('.')),
    Here templateEl.getReportData() returns a set of bytes which has some
    german special characters.
    We are generating the Bytes using String.getByes(),Just before
    String text = new String(in);
    collector.putBusinessObject(boName, bo);
    reportDocTemplateParser(collector, text);
    collector.removeBusinessObject(boName);
    String generatedText = collector.generateRTF();
    out = (null != generatedText) ? generatedText.getBytes() : null;
    The out put is the if i am giving a word with german special characters for eg:
    Betriebsübersichten it first gets converted to bytes and then passes through method WDResouseFactory.createResourse(.....) which creates an RTF file and finally in the RTF file it appears as Betriebsbbersichten the special character is not displayed correctly.
    i came to knw that while converting into bytes we have to make it RTF supported encoding.ie for eg generatedText.getBytes('cp1252').i even tried with other charactersets like ISO-8859,cp1253 and so on but none of them worked.
    It would be really great if you could suggest the needful.
    Thanks and Regards
    Neeta

    I soved this by using get_data function of response object. Then converting this into ISO-8859-1 charset.
    See code below.
    DATA :  lv_encoding   TYPE abap_encoding,
              lv_conv       TYPE REF TO cl_abap_conv_in_ce,
              lv_x_string   type xstring.
      lv_x_string = pv_http_client->response->get_data( ).
        lv_encoding = '1100'.
        lv_conv = cl_abap_conv_in_ce=>create(
                              encoding = lv_encoding
                                 input = lv_x_string ).
        lv_conv->read( IMPORTING data = pv_result ).

  • Reports with output to excel - special characters not displayed correctly.

    Hi,
    I have a portal with data from 5 continents. In many places special or national characters are used in names. My portal can show most of these characters correctly and so can my version of Microsoft Office Excel. When text with these characters are copy/pasted from the screen to an excel sheet, they are also shown correctly in excel. The problem arises in portal reports, where output is set to Excel, then special characters are often displayed as strange double characters, for example á is shown as á . Does anybody have a solution to that?
    Thanks
    Arne

    No answers have been posted yet and now I have found a solution myself. The portal report is run and output set to Excel. The resulting file is opened, and a new row is inserted in the top of the sheet. In the first field in this row is written the characters *\xEF\xBB\xBF*. It is called a UTF-8 BOM, and when written in the start of a text file, it will tell the program that opens it, that UTF-8 encoding is used.<br><br>
    The file is saved with the file type CSV (semicolon separated) (*.csv) and excel is closed. When you click on the CSV-file, it is opened by excel, and now all characters with accents, circumflexes and umlauts are shown correctly.<br><br>
    The solution was found here: http://www.roosmaa.net/importing-utf-8-csvs-in-excel/

  • Non-English characters not displaying correctly - Serious Issue

    My corporate email is on a Lotus Domino server with Lotus Traveler installed.
    I have set my PlayBook (with OS 2) up to syncronize with the corporate email trough Active Sync (see http://alturl.com/qh3nn), which works perfectly.
    I have however noticed that in some emails special non-english characters are displayed correctly but in some emails special non-english characters are displayed as a black diamond with a question mark inside.
    This is of course a serious issue as most non English speaking countries use some special characters.
    When trying to understand this problem how can I analyse the emails and see what character set is being used?
    And of course better; has someone solved this?

    I am having the same problem. Is there any update available?

  • Problems with Turkish characters not displaying correctly

    A user is having problems with certain Turkish characters in particular fonts not displaying correctly (as shown below).
    The two fonts (Gill Sans and Helvetica LT CondensedLight) are used for English language marketing material.  Ideally, for continuity, the same font would be preferred for our Turkish language marketing material rather than changing it to a similar font.
    Helvetica LT CondensedLight
    Turkish character “ İ ” does not display correctly in either Word or InDesign.
    Gill Sans
    Turkish characters “ ş ” and “ ğ ” display correctly in Word but not InDesign.
    My questions are:
    1. For Gill Sans, why are the characters not displaying in InDesign but are in Word?
    2. I've noticed here: http://www.webtype.com/font/gill-sans-family/#glyphs-tab that the required characters are available within the Gill Sans font.  Is this because the font is newer and includes the additional characters?  Would this work in InDesign?

    One of the big differences between InDesign and Word is that Word will happily substitute glyphs without telling you. So, unless your installs of Word and of InDesign are using different versions of Gill Sans (which is possible, BTW) then your s-with-cedilla and your g-with-macron are actually not in Gill Sans but in some other font. I'm guessing Arial.
    It's possible that you have more than one Gill Sans installed (e.g. one in your Document Fonts folder and another in your system fonts folder) that have different glyph complements. Gill Sans has been around a long time, and the version I have from the 90s has no Turkish support whatsoever.
    As far as the capital-I-with-dot, you can check your glyph coverage in a variety of ways. In both InDesign and Word, you can open up a window that shows you all of the glyphs in a font. In InDesign, find it in Type -> Glyphs. In Word, it's called "Insert Symbol" and you can find it in Word 2010 by going to Insert -> Symbol -> More Symbols. I am guessing that the answer to this question is simply that your cut of Helvetica LT has no cap-I-with-dot. You'd need to pick a font that actually has support for Turkish. On WIndows, I use a very full-featured freebie called BabelMap to check font coverage. They have a Web version here:
    http://www.babelstone.co.uk/Unicode/babelmap.html
    but I personally prefer the downloadable .exe file.

  • Thai characters not displaying correctly within App

    Hi everyone,
    I have a Adobe Flex Mobile app displays Thai text, however this is not displaying correctly. While developing the App on my Windows machine and testing using the Adobe Flash Builder mobile emulator, the font/characters look correct.
    However when running the app on either the MAC Adobe Flash Builder emulator, the iPhone simulator or on an actual iPhone, the font/characters are incorrect.
    First I thought that it was maybe an encoding issue (I am using locale properties files to replace text), so followed instructions at this website Flash Builder, Flex language bundles showing strange symbols. Not utf8 encoded.Sefol however this did not solve the issue.
    Looking more closely at the text rendered, it looks as though all of the characters for each word are actually being rendered, but they are just being rendered in correctly. Where as if it was a encoding issue then it would be missing characters completely.
    So if you look at the first character, in the correct version it is built up of 3 components. If you look at the second image, you can see that these three components are present but just not all appearing within one character.
    Is this a font issue? or is it actually an encoding/rendering issue?
    My code for testing this is just a simple label tag
    <s:Label text="ชื่อผู้ใช้" fontFamily="Arial" fontSize="12" />
    Many thanks.

    Ok so after doing a bit more of an investigation into the Font being the issue and not the encoding type, it seems as though if I use a specific font which I know has the Thai characters, then they are displayed correctly.
    I have embedded the font into the App using the code:
    [Embed(source="../assets/Kinnari.ttf", mimeType="application/x-font", embedAsCFF="true", fontFamily="ThaiFont")]
      private var ThaiFont:Class;
    Then on my UI I have added the font:
    <s:Label text="ชื่อผู้ใช้" fontFamily="Arial" fontSize="12" fontFamily="ThaiFont" />
    I was able to find this font at a Hawaiian Educational website! Thai fonts :: Thai Language Program, University of Hawai'i, Manoa
    Thanks @tooMuchTrouble for your help.

  • Characters not displayed correctly

    Hi,
    After support package installation, chararcters are not displayed correctly when i use application server,
    for example when i write internal table into a file in text mode and read it after into attachment in binary mode
    but characters are not correct. And after mail sent, the half or file is sent, not all data available.
    What could be the reason?
    Char exp in debug of attachment: ㅔ䠰㘹㌲〰㤰㘰㌍ਲ䙈〶㤳㈰〹
    I get above char after i read the file, code like following:
    do.
      clear attch.
      read dataset filename into attch.
      if sy-subrc <> 0.
       append attch.
       exit.
      endif.
      append attch.
    enddo.
    Thanks.

    I think this problem is some what related to Unicode and you should use Encoding statements whith ur open dataset stetement as follows.
    open dataset ....................Encoding UTF-8.
    Encoding UTF-8 is for unicode environment.
    Hope this will help u.

  • Special Character not displayed correctly on Japanese OS

    Hi,
    I have an application build in LabVIEW that I want to install on a Japanese OS but some of the special character are not displayed correctly like °.
    Is it possible to tell my application to use the US ASCII table to display character? Or I need to code special case for Japanese OS?
    Thank you 
    Dany
    Dany Allard

    Hi Dany,
    It sound like tyou are trying to localize your application to Japanese. You might want to take a loot at this link here 
    Joe Daily
    National Instruments
    Applications Engineer
    may the G be with you ....

  • Special characters not displaying?

    I tried connecting to a BBS today and noticed there were a lot of jewel-with-a-question-mark-shaped characters displayed. I'm almost certain they should be some type of character that isn't being displayed correctly:
    Is there a special way to make these characters visible? I'm not certain of the font I'm using, and not entirely sure how to figure it out. I've read is some places that this might be IBM extended ASCII? If it is, how could I get/install it on my system?
    I don't have a specific font set in /etc/vconsole.conf:
    [mukti@blackmesa ~]$ cat /etc/vconsole.conf
    KEYMAP=us
    Does anyone have any ideas? Thanks!
    -- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code [jwr] --
    Last edited by mukti (2012-12-10 02:24:38)

    Hello Paul,
    I once used hexadecimal coded characters like &xnnn; and they were not transformed. When coding them in decimal, everthing worked fine.
    Hth
    J�rg

  • French special characters not displayed properly in discoverer 11g

    Gurus
    We are upgrading to discoverer 11.1.1.3
    I have found that French special characters (letters with accents) are not displayed properly in the discoverer tool menu.
    Example
    Sélectionner is displayed as S?lectionner.
    This doesn't seem to be a server issue as one of the tester (in U.S) is able to see the french characters displayed and ironically it is not the case in France itself where this is required.
    Please help
    Regards
    Ariv

    Pl post details of the two clients being used in this scenario - the exact OS version, browser version, browser language settings, Java version etc
    Since the accented character shows on one client , the issue is with the client or the settings on the client where the accented character is not showing correctly.
    HTH
    Srini

  • [Solved] Characters not displaying correctly in some applications

    When I read things in applications like Firefox I've noticed that sometimes the " symbol is displayed wrong. Sometimes it is shown as what I can only describe as two forward-ticks stuck together (it won't let me paste it), and other times as two back-ticks ``. When I try to paste code over to the rxvt-unicode terminal the forward-tick symbol is displayed as a question mark, as are some other special symbols like maths characters. So I have two questions: are there any terminals that support such special characters? And is my character display problem related to setting up my locales correctly (which I think I already have)?
    I followed the steps on the wiki for setting up locales. I uncommented "en_GB.UTF-8 UTF-8" and "en_GB ISO-8859-1" in /etc/locale.gen, ran locale-gen as root, and added  LOCALE="en_GB.utf8" to /etc/rc.conf and "export LANG=en_GB.utf8" to my .zshrc. locale -a shows that the correct locales are installed.
    Last edited by slyson (2009-06-16 15:20:18)

    See this pdf for fixes: unix.derkeiler.com/pdf/Mailing-Lists/Fr … g00564.pdf.
    Type 'locale' on the console to find out your locale. Mine is en_GB.utf8.
    Now add the following to your shell profile or ~/.xinitrc.
    I already had this in my .zshrc:
    export LANG=en_GB.utf−8
    But I think the LC variable was overriding it. I Changed my LC_ALL to:
    export LC_ALL=en_GB.utf8
    (It was set to LC_ALL=C before).
    The above fixes copy/paste to most terminal apps, but some still misbehave. For example, I had to add this to ~/.emacs:
    ;; Set language environment for MULE.
    (set−language−environment 'UTF−8)
    ;; My customization for text modes
    (defun my−text−mode−hook ()
    (auto−fill−mode 1)
    (show−paren−mode t)
    (activate−input−method 'rfc1345) ; Good input method for UTF−8
    (add−hook 'text−mode−hook 'my−text−mode−hook)
    More examples are given on page 3 of the pdf.
    Last edited by slyson (2009-06-16 15:26:31)

  • Utf8 characters not displayed correctly

    I have a database created with collation of latin1_swedish_ci
    which contains big5. I realise that I have to create the db using
    utf8 in order to display correctly. However, due to the db was
    created long ago, I could not change it. Is it possible to do a
    conversion before the characters are displayed?
    default charset of apache is utf-8
    connection string is added
    "useUnicode=true&characterEncoding=UTF-8"

    dynason wrote:
    > I have a database created with collation of
    latin1_swedish_ci which contains
    what "database"? what datatypes?
    > big5. I realise that I have to create the db using utf8
    in order to display
    if the columns holding your text datatypes aren't unicode
    capable, then you'll
    never get the data out except the same way it went in.
    depending on the db, datatypes, app server, it's a good bet
    that the data's not
    big5 but some corruption of it.

  • German special characters not displaying on page instead of that Question marks displayed

    when i submit form,i need to send a mail with filled data.Here Suppose user entered german special characters.I am getting Question marks instead of ä,Ä,ö,Ö,ü,Ü,ß. I have used meta tag like
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />.But i am getting fine characters with IE and Chrome.I am using FireFox 3.6.16 english.

    Hello core team,
    Thanks a lot!!!!
    i m not only the person to use html form.So many non technical persons using the same. how can i tell to all persons regarding changing character encoding. i need some permenant solution,

  • Special Characters Not Displaying at Logon Screen

    Hello, my daughter set her password on her iPad using special characters and has been able log in  by holding down a certain letter on the keyboard and choosing a latin character.  This is no longer working as the popup menu doesn't appear when holding down on letters anymore.  She recently updated it to iOS8, but claims that she was able to log in at least a few time since the update.
    Is there any trick to making these special character menus appear again?  Thanks so much.

    Hello Paul,
    I once used hexadecimal coded characters like &xnnn; and they were not transformed. When coding them in decimal, everthing worked fine.
    Hth
    J�rg

  • Special characters dont display correctly

    Hi
    This site http://www.fuentes22.com is in Spanish and some characters like á, é, í, ó, ú and ñ dont display correctly in some browsers like Chrome (Firefox looks fine). It was fine when we launch it but now its all broken.
    How can we solve it?
    Thanks!

    Thanks Zak
    I have uploaded the whole page again via FTP and it seems like that has corrected the problem.
    It was really odd because it was fine and got broken without any apparent reason.
    Regards
    Juan

Maybe you are looking for

  • EXCEL spreadsheet with MACROS

    WILL NUMBERS 2009 SUPPORT AN EXCEL SPREADSHEET WITH EMBEDDED MACROS?

  • How do I disable one item in a radio buttons control at run time

    I need to disable one item in a radio buttons control. At design time this is possible, but how do I do this at run time? Is this possible? I cannot find a property per item

  • Data load failed while loading data from one DSO to another DSO..

    Hi, On SID generation data load failed while loading data  from Source DSO to Target DSO. Following are the error which is occuuring-- Value "External Ref # 2421-0625511EXP  " (HEX 450078007400650072006E0061006C0020005200650066 Error when assigning S

  • Dafault document type in MIR7 transaction

    HI Friends, Need your help on the following issue For MIR7 transcation in OMR4 we configured the default document type as RE . When ever we use MIR7 the default doc type was taking as RE. It is fine But ,all of as sudden when we use MIR7 today the de

  • Simulating of system time for JVM

    I have following problem: There is a big system written in Java, which needs to be tested automatically. There are test cases, which concern events in the future - in a few days, months, etc. That means, some initial state of the system can be prepar