How to read ISO characters???

Hi, I'm trying to read the headers of an email.
In the "subject" section I have some words in french, imagine the subject is "Café" (whith the accented e).
The content of the subject header is not "Café" instead it is: =?ISO-8859-1?Q?Caf=E9?=.
The the thing is I'm writing a MailReader so I can't use Javamail or something like that and of course I can't display the whole ISO-88... thing.
What can I do to solve this?? Is there a class or method somewhere so I can get the word caf? and not ISO-8859-1?Q?Caf=E9?=.
Thanx a lot in advanced!

Sounds like you have two issues to deal with here, though i'm not positive about the first.
1) From what you posted, it seems the subject header provides you with the name of the charset encoding being used, in this case ISO-8859. To me, it looks as though you need to parse this information, for use below...
2) The second issue is that of decoding ISO-8859 character streams, or for that matter any other character set. Thankfully, the java.nio package's CharBuffer class, along with a number of helper classes, make this really simple.

Similar Messages

  • How to read Korean characters using Java program?

    In Oracle table, i am having Korean characters, how to read those characters using JDBC and insert into SQL Server?
    NLS_NCHAR_CHARACTERSET is UTF8

    What data type is the column in the Oracle table? The NLS_NCHAR_CHARACTERSET would control the encoding of NCHAR and NVARCHAR2 columns. The NLS_CHARACTERSET would control the encoding of CHAR and VARCHAR2 columns.
    Justin

  • How to read Chinese Characters in iTunes?

    Hi all,
    Is there anyone who can enlighten me on how I can read chinese characters in iTunes? I have quite a number of Chinese songs that I wish to be played in iTunes, but I noticed that it does not read the chinese song titles and had small rectangles in place of the chinese characters.
    I tried using a third-party software lke NJStar, but the chinese characters resulted were crammed together and were not legible.
    Please help. Thanks.

    now instead of small
    little squares, there are funny symbols and letters
    that don't make any sense whenever there are
    supposedly chinese characters.
    That probably means that the id3 tags on your songs are not encoded correctly. I understand that the program ConvertZ can help fix this.

  • How to read chinese characters with Nano

    I transfered some chinese songs to my Nano using iTunes.
    But now i can't read the characters...

    Please always tell people what OS you are using.
    Most likely the ID3 tags for the songs are not encoded correctly for the iPod. See this note for some info:
    http://discussions.apple.com/thread.jspa?threadID=121866&tstart=15
    If you are running Windows, there is a program called ConvertZ that may help.

  • How to read characters from a string ?

    Hi,
    In my java program I accepted string from the user and now I want to calculate the length of the string, and then read characters one by one to encrypt it.
    How to read the characters one by one ? Like Mid$ function in VB.
    Small code to illustrate will be appreciated.

    Hi,
    Pick one!
    public class A
      public static void pokeAtString( String s )
        for( int i = 0; i < s.length(); ++i )
          System.out.print( s.charAt( i ) );
      public static void useCharArray( String s )
        char[] c = s.toCharArray();
        for( int i = 0; i < c.length; ++i )
          System.out.print( c[i] );
      public static void main( String[] args )
        String s = "Once was a good man.";
        System.out.print( "PokeAtString: " );
        pokeAtString( s );
        System.out.print( "\nuseCharArray: " );
        useCharArray( s );
        System.out.println( "" );
    }Enjoy,
    Manfred.

  • Reading Japanese Characters from Properties File

    I am running on Windows 2000 (English). Can any one suggest on how to read Japanese Characters from a ".properties" file.
    TIA

    look at ResourceBundle and unicode encoding,
    Jim

  • How to display " ISO-8859-1 " (eg - " &eacute " ) characters in LabelField .

    hai,
    How to display  " ISO-8859-1 " (eg - " &eacute " ) characters in LabelField .
    Regards
    Ratheesh R Kurup

    Hi,
    Perhaps
    with a as
    select 'TESTING' text from dual
    select level, substr(a.text,level,1)
    from a
    connect by level <= length(a.text)

  • How to read characters from a text file in java program ?

    Sir,
    I have to read the characters m to z listed in a text file .
    I must compare the character read from the file.
    And if any of the characters between m to z is matched i have to replace it with a hexadecimal value.
    Any help or suggesstions in this regard would be very useful.
    Thanking you,
    khurram

    Hai,
    The requirement is like this
    There is an input file, the contents of the file are as follows, you can assume any name for the file.
    #Character mappings for Japanese Shift-JIS character set
    #ASCII character Mapped Shift-JIS character
    m 227,128,133 #Half width katakana letter small m
    n 227,128,134 #Half width katakana letter small n
    o 227,129,129
    p 227,129,130
    q 227,129,131
    r 227,129,132
    s 227,129,133
    t 227,129,134
    u 227,129,135
    v 227,129,136
    w 227,129,137
    x 227,129,138
    y 227,129,139
    z 227,129,142
    The contents of the above file are to be read as input.
    On encountering any character between m to z, i have to do a replacement with a hexadecimal code point value for the multibyte representation in the second column in the input file.
    I have the code to get the unicode codepoint value from the multibyte representation, but not from a file.
    So if you could please tell me how to get the characters in the second column, it would be very useful for me.
    The character # is used to represent the beginning of a comment in the input file.
    And comment lines are to be ignored while reading the file.
    Say i have a string str="message";
    then i should replace the m with the unicode code point value.
    Thanking you,
    khurram

  • How to read table fields form a table  having length of 7 characters

    HI all,
    could you please tell me how to read table fields from a table having length 7 characters, i have requirement that in my ztable i have 30 fields out of which 20 fields are location fields, i want to select 20 fields which have 7 characters length.
    please could any body suggest me on this issue.
    thanks,
    sre.

    hi,
    try like this
    create a data variable of type i as
    data: len type i.
    create internal table for 20 fields as
    data:begin of itab,
               fld 1 type .......
            end of itab.
    data:itab type itab1 occurs 0 with header line.
    loop at itab2. // original internal table which all fields.
    read table itab2 with index sy-tabix.
    len = strlen (itab2-fld).
    if len eq 7.
          move itab2 itab1.
          append itab1.
    endif.
    endloop.
    if helpful reward some points.
    with regards,
    Suresh.A

  • How can I make my BB 8800 read arabic characters?

    I havn't bought the BB yet, I just want to make sure if it can read arabic characters.....
    It's really important help please....

    Hi psycho-blazem
    The language support offered on a BlackBerry smartphone depends on the wireless carrier.
    http://www.blackberry.com/btsc/KB12390
    Thanks,
    -FS
    Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.
    Click Solution? for posts that have solved your issue(s)!

  • How can Mail of OS X Mountain Lion read Chinese Characters?

    Mail cannot read Chinese characters. Message looks like a series of "??????". However, Safari can read Chinese characters. What setting can make Mail read Chinese Characters?

    Pippi10 wrote:
    Mail cannot read Chinese characters. Message looks like a series of "??????".
    Normally that indicates an encoding glitch, where the email headers are not telling Mail the right encoding to use.  The first thing to try is Message > Text Encoding and see if UTF-8 or one of the various Chinese encodings give the right display.
    Also go to View > Message > Raw Source and tell us what you see in the headers that say "charset=  ".

  • How to print Special Characters in Sap-Scripts

    How to print Special Characters in Sap-Scripts
    Thanks,
    Ravi

    Hi
    if u want print special characters we can use hot codes i.e '  '  (single inverted commas). in between these hot codes insert u r special characters.
    write    '    !@#$%^&*( )  '.
    for the above write statement output is
    output is   !@#$%^&*( )

  • How to read an attribute of an xml tag in jsp.

    hi guys,
    This is murali krishna. i have a small problem,
    i have one xml file (books.xml)
    <?xml version="1.0" encoding="iso-8859-1"?>
    <library>
    <book id="1">
    <name>Head First Java, 2nd Edition</name>
    <author>Kathy Sierra and Bert Bates</author>
    <publication-date>09-Feb-2005</publication-date>
    </book>
    <book id="2">
    <name>Effective Java</name>
    <author>Joshua Bloch</author>
    <publication-date>28-May-2008</publication-date>
    </book>
    <book id="3">
    <name>Java How to Program, 7th Edition</name>
    <author>Harvey M. Deitel and Paul J. Deitel</author>
    <publication-date>6-Jan-2007</publication-date>
    </book>
    </library>
    I tried to read this xml file in jsp as shown below
    <%@ page language="java" %>
    <%@ page import="org.w3c.dom.*" %>
    <%@ page import="javax.xml.parsers.DocumentBuilder" %>
    <%@ page import="javax.xml.parsers.DocumentBuilderFactory" %>
    <%
    DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
    DocumentBuilder db =dbf.newDocumentBuilder();
    Document doc=db.parse("c:\\books.xml");
    NodeList nl = doc.getElementsByTagName("book");
    %>
    <html>
    <head>
    <title>How to read XML file in JAVA</title>
    </head>
    <body>
    <%
    for(int i=0;i<nl.getLength();i++)
    NodeList nameNlc= doc.getElementsByTagName("name");
    Element nameElements=(Element)nameNlc.item(i);
    String nameTagValue=nameElements.getChildNodes().item(0).getNodeValue();
    NodeList authorNlc= doc.getElementsByTagName("author");
    Element authorElements=(Element)authorNlc.item(i);
    String authorTagValue=authorElements.getChildNodes().item(0).getNodeValue();
    NodeList dateNlc= doc.getElementsByTagName("publication-date");
    Element dateElements=(Element)dateNlc.item(i);
    String dateTagValue=dateElements.getChildNodes().item(0).getNodeValue();
    out.println("name :"+nameTagValue+"<br>");
    out.println("author :"+authorTagValue+"<br>");
    out.println("publication-date :"+dateTagValue+"<br><br>");
    %>
    </body>
    </html>
    so, my problem is I was unable to read the attribute of the tag book , that is "id".
    can any one tell me how to read this "id" attribute.
    Murali Krishna
    [email protected]

    hi,
    U r retriving the elements by tag name.So it just chks the tag name ie.<book> & gives u array of elements.But u need retrive d attribute of <book> tag itself.
    =Solution =====
    Add one more statement ----> var[]= doc.getElementsByName("book");
    Now u hav book elements as an array & can retrive id in for loop
    for(var; var.length;var++)
    doc.element[var].id.value

  • How to read the content of a text file (by character)?

    Guys,
    Good day!
    I'm back just need again your help. Is there anyone knows how to read the content of a text file not by line but by character.
    Please help me. Thank you so much in advance.
    Jojo

    http://java.sun.com/javase/6/docs/api/index.html
    package java.io
    InputStream.read(): int
    Reads the next byte of data from the input stream.
    Implementation:
    InputStreamReader
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted.

  • How to show Greek characters in Italic style

    How to show Greek characters in Italic style
    Hi all, I'm tryng to resolve a problem with the Greek characters
    I need to display labels in two languages, english or greek inside my report.
    At the beginning of the report I have a placeholder with the xml code : *<?param@begin:p_language?>*, so I can understand inside my report if the user chose the Greek or English, and then I have many placeholders (labels) which have to be written in Greek or English.
    If the language chosen is English, I don't have any problem to show my labels bold or italic in every fonts
    Inside the placeholder I wrote the following code:
    *<?xdofx:if $p_language = 'Ελληνικά' then 'Οργανισμός' else if $p_language = 'Αγγλικά' then 'Organization' end if?>*
    I can chose font, style and bold/not bold directly from Word and when I run the report in pdf I see exactly what I chose.
    If the language chosen is Greek....I see always the label in Arial, NOT BOLD and NOT ITALIC...
    In order to see Greek characters BOLD:
    a) I added (under the ADMIN tab/Runtime Configuration/Font Mappings/ ) a font named Arial and I addeda target Font named Arialbd.ttf under the directory: D:\Oracle\Oracle_Homes\BIP_101341\jdk\jre\lib\fonts
    b) I changed the font (from word) to Arial
    Now, ONLY with tha ARIAL font I can see my labels in greek bold, but I can't still see them in italic style.....
    So, I tried to force these condition inside the placeholder with the following code:
    *<?if:$p_language = 'Ελληνικά'?><xsl:attribute xdofo:ctx="inlines" name="font">Times New Roman</xsl:attribute><xsl:attribute xdofo:ctx="inlines" name="font-style">Italic</xsl:attribute><xsl:attribute xdofo:ctx="inlines" name="color">red</xsl:attribute><xsl:attribute xdofo:ctx="inlines" name="font-weight">bold</xsl:attribute>Οργανισμός<?end if?>*
    ...but I continue to see the labels in Greek only bold, red but not in Italic Style......
    Also adding another font called Arialbi.ttf (Arial bold Italic)...I can't see my labels in Greek bold with Italic Style....
    Anybody had the same problem with another alphabet different from the latin one ???
    Any help will be appreciated
    Thanks in advance
    Alex

    Hi Chris,
    Thanks for your reply.However I still have some problems.
    I couldnt get jpdk 3.0.9.0.4 version the latest version that I
    got was jpdk 3.0.9.0.2.
    I tried the 3.0.9.0.2 version and it gave me the below error.
    Error-
    sun.io.MalformedInputException
         at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java,
    Compiled Code)
         at java.io.InputStreamReader.convertInto
    (InputStreamReader.java, Compiled Code)
         at java.io.InputStreamReader.fill
    (InputStreamReader.java, Compiled Code)
         at java.io.InputStreamReader.read
    (InputStreamReader.java, Compiled Code)..........
    Can you guide me regarding this ???
    Regards,
    Mandar.

Maybe you are looking for

  • Can we view the long Description in T C- CRM_DNO_MONITOR

    Hi guru,   Can any SAP Guru's help me to solve the given Below issue 1.  Is it possible to view the Whole  relpy text in the transaction CRM_DNO_MONITOR. 2. I can we the support BP No but is it possible to view the Support team  name along with the s

  • Atv2 video stops after 1 minute, can't access options just hear click noise

    Suddenly any video, Netflix ,YouTube will stop and back to main menu. Also I attempted to rent movie from iTunes but the rent option did nothing just a click noise. So I attempted to reset box through settings- general but reset also just clicks. Sam

  • Show/Hide tabs in top level navigation of a role based on assigned services

    Hi, I have an interesting requirement. I have created an overview page in abap web dynpro which has links to various services. Based on the r3 roles assigned to the user, we need to show/hide the services in the overview page and top level navigation

  • Not able to display the values on the alv report.

    Hi all,   loop at it_stpo.     indx = sy-tabix.     select single bdmng from resb into it_resb-bdmng                     where matnr = it_stpo-idnrk                     and xloek ne 'X'. it_stpo-bdmng = it_resb-bdmng. modify it_stpo index indx.   end

  • Send report as email thru bursting

    I am trying to send report by email thru bursting. My query follows: SELECT CLIENT_ID AS KEY ,'afsrep' AS TEMPLATE ,'RTF' AS TEMPLATE_FORMAT ,'en-US' AS LOCALE ,'EXCEL' AS OUTPUT_FORMAT ,'FILE' AS DEL_CHANNEL '[email protected]' PARAMETER1, '[email p