Decoding-problems on subject

Hello all,
as far as I observed javamail does an automatic decoding of an eMail-subject for me. So a
Subject: =?iso-8859-1?B?QW1hem9uLmRl?=
automaticly becomes
Subject: Amazon.de
Now I get a message with the subject:
Subject: openBC:=?UTF-8?Q?=20Ingo=20Gr=C3=BCneberg=20hat=20?= =?UTF-8?Q?Sie=20als=20Kontakt=20best?==?UTF-8?Q?=C3=A4tigt?=
which will not be decoded by javamail. I tried to work around the problem and forced my application to decode the subject one more time - no result:
System.out.println(MimeUtility.decodeText("openBC:=?UTF-8?Q?=20Ingo=20Gr=C3=BCneberg=20hat=20?= Sie als Kontakt best=?UTF-8?Q?=C3=A4tigt?="));
-> openBC:=?UTF-8?Q?=20Ingo=20Gr=C3=BCneberg=20hat=20?= Sie als Kontakt best=?UTF-8?Q?=C3=A4tigt?=
Then I thought the string would be the problem, but Thunderbird decodes the subject right!??
Any sugestions? Thanks a lot in advance!
Stephan
Message was edited by:
lotk

First of all,i want to show you my code:
package orlab.test;
import java.io.File;
import java.io.FileInputStream;
import javax.mail.internet.MimeMessage;
public class Program {
* @param args
* @throws Exception
* @throws
public static void main(String[] args) throws Exception {
System.setProperty("mail.mime.decodetext.strict", "false");
File dir = new File("c:/Mail");
File[] files = dir.listFiles();
for (int i = 0; i < files.length && i < 4; i++) {
File f = files;
if (!f.isFile()) {
continue;
FileInputStream fis = new FileInputStream(f);
MimeMessage mm = new MimeMessage(null, fis);
String rowHeader = mm.getHeader("Subject")[0];
// System.out.println(MimeUtility.decodeText(mm.getSubject()));
if (!rowHeader.equals(mm.getSubject())) {
// continue;
System.out.println("File\t\t:" + f.getName());
System.out.println("Raw\t\t:" + rowHeader);
System.out.println("Subject\t\t:" + mm.getSubject());
fis.close();
System.out.println("_______________");
the raw mail data like this:
_*Message-ID: <[email protected]>*_
_*Date: Fri, 6 Jun 2008 19:06:47 +0900 (JST)*_
_*Subject: SOME=?ISO-2022-JP?B?GyRCTU0wRjdvJUElJyVDJS8lNyE8JUgbKEI=?=*_
this is the code which can decode "SOME=?ISO-2022-JP?B?GyRCTU0wRjdvJUElJyVDJS8lNyE8JUgbKEI=?=
"to"SOME&#27096;&#26696;&#20214;&#12481;&#12455;&#12483;&#12463;&#12471;&#12540;&#12488;
", when i using gnu javamail.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Subject decoding problem with dash '-'

    When trying to decode a raw email with the following subject with MimeUtility the charactersequence =96 is not decoded correctly.
    When printed to the console a strange square box is drawn. When the same string is persisted to our database, the box ends up as a ? (questionmark) in the textfield.
    Subject: =?ISO-8859-1?Q?ICQ=2C_MSN=2C_AOL=2C_Yahoo!_Alle_Messenger_in_einem_Programm_=96_kostenlos!?=
    Edited by: markward.schubert on Aug 25, 2009 1:51 AM

    markward.schubert wrote:
    When trying to decode a raw email with the following subject with MimeUtility the charactersequence =96 is not decoded correctly.
    When printed to the console a strange square box is drawn. When the same string is persisted to our database, the box ends up as a ? (questionmark) in the textfield.
    Subject: =?ISO-8859-1?Q?ICQ=2C_MSN=2C_AOL=2C_Yahoo!_Alle_Messenger_in_einem_Programm_=96_kostenlos!?=The character with byte 0x96 in ISO-8859-1 is a control character (specifically SPA or Start of Guarded Area), so it cannot be decoded to a visible character. Most likely the encoding is actually WIN1252 (or CP1252), where 0x96 is a broader version of a dash. See [http://en.wikipedia.org/wiki/ISO_8859-1#ISO-8859-1] and [http://en.wikipedia.org/wiki/Windows-1252]

  • Problem with "subject" & "recipient list" of reporting agent

    Hi,
    I've created an exception in a query & assigned "E-mail notification" for this exception in reporting agent. I entered "Subject" field and assigned "distribution list" to "Recipient list" field in the e-mail notification attributes.
    After transporting, reporting agent & package, everything moved fine but subject & recipient fields are not carried over to Quality system. both the fields are blank.
    What is the problem?
    How do I make sure that these 2 fields are also transported to Quality & Production rather than manually maintaining them again in the target system.
    Appreciate any help.
    Hari Immadi
    http://immadi.com
    SEM BW Analyst
    Message was edited by: Immadi Hari

    Hari,
    Did you ever get this resolved?  We are currently experiencing the same problem.
    Thanks,
    Bill Lomeli

  • Payload decoding problem

    Hi
    Im using 10.1.2.3 b2b with mlr#7. In edi 841 transaction im encoding a .jpeg(image) file in to base64 format and attaching it to the binary data section.The output raw edi data has the decoded jpeg file but it was corrupted.I donno how to get my original .jpeg(image) file.Same thing happens for .pdf format.Kindly help in resolving this issue.
    Regards
    venkat

    Hi Venkat,
    No there is no such rule and B2B will decode it in the same format.
    If you have applied MLR#7 successfully then it should work.
    Anyways, take the attachment content from the wiremessage and decod it using base 64 encoding manually and save it as a jpeg, and try to open. If then also you are not able to open then decode it twice and now save it as jpeg and try to open. I am asking this because prior to MLR#7 there was problem of attachments getting encoded twice.
    You may consider forwarding wire message and b2b log in debug mode to my id (in my profile).
    Regards,
    Anuj

  • Decode problem

    Hi,
    I have a problem with a decode function.
    I try to execute this select:
    select (DECODE(:CU_IES, 'D', (DECODE(:P_FISC, 1, a.flag1, 0, a.flag2) in (2,3,4)), (DECODE(:P_FISC, 1, a.flag1, 0, a.flag2) in (2,3,4,6))))
    from flag a
    and a get this error ORA-00907: missing right parenthesis.
    I try to this in Report Builder 6.0.8.11.3.
    I want to do this: when :cu_ies is 'D' to bring me flags 2,3,4 and if not 'D' to bring me flags 2,3,4,6. (All flags are from 0 to 6)
    What I have done wrong?
    Anyone can help me?

    Try using case instead of decode
    SELECT SUM(CASE :p_fisc,
                 WHEN 1 THEN
                  nvl(a.val_int, 0) + nvl(a.val_mod, 0) + nvl(a.val_dep_int, 0)
                 WHEN 0 THEN
                  nvl(a.val_int_int, 0) + nvl(a.val_mod_int, 0) +
                  nvl(a.val_dep_int, 0) + nvl(a.prov_dez_val, 0)
               END) val_inv1,
           0 val_inv2,
           a.cod_cat
      FROM flag a, MJ M
    WHERE a.identif_a = M.identif_a
       AND (CASE :P_FISC WHEN 1 THEN a.flag1 WHEN 0 THEN a.flag2
            END IN (2, 3, 4) OR :cu_ies = 'D')
    GROUP BY a.cod_cat
    UNION ALL
    SELECT 0 val_inventar1,
           SUM(CASE :p_fisc
                 WHEN 1 THEN
                  nvl(a.val_int, 0) + nvl(a.val_mod, 0) + nvl(a.val_dep_int, 0),
                 WHEN 0 THEN
                  nvl(a.val_int_int, 0) + nvl(a.val_mod_int, 0) +
                  nvl(a.val_dep_int, 0) + nvl(a.prov_dez_val, 0
               END)) val_inv2,
           a.cod_cat
      FROM flag a, MJ M
    WHERE a.identif_a = M.identif_a
       AND (CASE :P_FISC WHEN 1 THEN a.flag1 WHEN 0 THEN a.flag2
            END = 5 OR :cu_ies = 'D')
    GROUP BY a.cod_catHTH
    SS

  • Sorting: ORDER BY DECODE Problem on Pagination Query

    Hi,
    I've been searching around the easiest way to perform a dynamic "ORDER BY" clause and the "DECODE()" clause solution seem to be exactly what I am looking for. Unfortunately, It seems the DECODE function is not returning a correct column name value (I think it is returning NULL) since I'm receive the result set as if there was no ORDER BY clause.
    I need some help to get through this!
    Here the version with DECODE (not working)
    It is a Procedure with frstRow, nbRows and var_order as parameters
    The output returns the rows as if no ORDER BY was used
    SELECT c1, c2
    FROM
    SELECT ROWNUM rn, arv.*
    FROM A_AWA_AR arv
    WHERE ROWNUM < (frstRow + nbRows - 1) -- show only some rows determined by procedure
    ORDER BY DECODE(var_order, 1, c1, 2, c2, c1) -- sort by var_order
    WHERE rn BETWEEN frstRow AND (frstRow + nbRows)
    AND ROWNUM <= nbRows
    Here the version without DECODE (working)
    The output returns the rows as expected - ordered by c2 column
    SELECT c1, c2
    FROM
    SELECT ROWNUM rn, arv.*
    FROM A_AWA_AR arv
    WHERE ROWNUM < (frstRow + nbRows - 1) -- show only some rows determined by procedure
    ORDER BY c2 -- sort by var_order
    WHERE rn BETWEEN frstRow AND (frstRow + nbRows)
    AND ROWNUM <= nbRows
    -----

    Here are some results I've been getting... I will try the best I can to explain my problem.
    And by the way the table A_AWA_AR is a VIEW maybe this can help.
    My problem -- I think -- is that I don't understand how DECODE works. I should be a conditional IF-ELSE-THEN-like function but its behavior is not returning what I'm expecting.
    I need a solution where I will be able to sort the first lets say 10 rows using ROWNUM to tag row position (in sub-query) then the main query should only show the rows from 3rd postion to 7th position in the main query (as an example) with RN BETWEEN 3 AND 7. My solution does not work when I use decode but works when i pass the column name directly.
    Here is a simple query returning the values in the order they are found in the view:
    SELECT ROWNUM rn, ROW_ID, SR_NUM
    FROM A_AWA_AR
    WHERE ROWNUM < 10 Results:
    RN                                     ROW_ID          SR_NUM                                                         
    1                                      1-100876        1-60476802                                                     
    2                                      1-10087G        1-60476812                                                     
    3                                      1-10087Q        1-60476822                                                     
    4                                      1-10088A        1-60476842                                                     
    5                                      1-10088K        1-60476852                                                     
    6                                      1-10088U        1-60476862                                                     
    7                                      1-100894        1-60476872                                                     
    8                                      1-10089E        1-60476882                                                     
    9                                      1-10089O        1-60476892                                                      Now this is the query & result I would like to obtain (this is done pretty fast since it returns as soon as it reaches 9 sorted rows):
    SELECT ROWNUM rn, ROW_ID, SR_NUM
    FROM A_AWA_AR
    WHERE ROWNUM < 10
    ORDER BY SR_NUMResults:
    RN                                     ROW_ID          SR_NUM                                                         
    1                                      1-1RV9J7        1-107274499                                                    
    2                                      1-1RVXIF        1-107305575                                                    
    3                                      1-1SHY65        1-108332861                                                    
    4                                      1-22FOSR        1-125023563                                                    
    5                                      1-236F3X        1-126270717                                                    
    6                                      1-28P5EB        1-135542675                                                    
    7                                      1-29P2VY        1-137219038                                                    
    8                                      1-29ZNFH        1-137712221                                                    
    9                                      1-2BLWQR        1-140430339                                                     But with decode even a simple pseudo decode:
    SELECT ROWNUM rn, ROW_ID, SR_NUM
    FROM A_AWA_AR
    WHERE ROWNUM < 10
    ORDER BY DECODE(1,1,SR_NUM)Results:
    RN                                     ROW_ID          SR_NUM                                                         
    1                                      1-100876        1-60476802                                                     
    2                                      1-10087G        1-60476812                                                     
    3                                      1-10087Q        1-60476822                                                     
    4                                      1-10088A        1-60476842                                                     
    5                                      1-10088K        1-60476852                                                     
    6                                      1-10088U        1-60476862                                                     
    7                                      1-100894        1-60476872                                                     
    8                                      1-10089E        1-60476882                                                     
    9                                      1-10089O        1-60476892                                                      Here is the structure I'm trying to get and works when passing a column name:
    SELECT *
    FROM
        SELECT ROWNUM rn, ROW_ID, SR_NUM
        FROM A_AWA_AR
        WHERE ROWNUM < 10
        ORDER BY SR_NUM
    WHERE rn BETWEEN 3 AND 7Results:
    RN                                     ROW_ID          SR_NUM                                                         
    3                                      1-1SHY65        1-108332861                                                    
    4                                      1-22FOSR        1-125023563                                                    
    5                                      1-236F3X        1-126270717                                                    
    6                                      1-28P5EB        1-135542675                                                    
    7                                      1-29P2VY        1-137219038                                                     Now with decode (not working):
    SELECT *
    FROM
        SELECT ROWNUM rn, ROW_ID, SR_NUM
        FROM A_AWA_AR
        WHERE ROWNUM < 10
        ORDER BY DECODE(1,1,SR_NUM)
    WHERE rn BETWEEN 3 AND 7Results:
    RN                                     ROW_ID          SR_NUM                                                         
    3                                      1-10087Q        1-60476822                                                     
    4                                      1-10088A        1-60476842                                                     
    5                                      1-10088K        1-60476852                                                     
    6                                      1-10088U        1-60476862                                                     
    7                                      1-100894        1-60476872                                                      Thanks for the support!

  • Acrobat XI Decoder Problem

    An error says that Acrobat XI does not have a decoder for audio content.  The file is an MP3.  I have the latest Flash player installed.  Running Windows 8.  How do I fix?

    I would like to provide a sample, but I do not know how to do so from a proprietary disk that cost about $900.  Pat Willener's link seem to go to purchasing some cloud services.  I do not know of how I can provide you with a sample.  The problem is aggravating and did not occur with Windows 7 or the Reader version that I had before my prior computer bricked.  There has to be a way that you can work with me to fix this problem.  I would be happy to upload files if there was a clean and simple way to do so.  So far, I find this exercise to be a kluge and entirely unhelpful.  I took a screen shot of the error message and saved it in CS6 as a .psd.  You will not even let me upload that!  This is unhelpful.

  • Creative T7700 and DTS-100 Decoder (PROBLEMS, PLEASE HELP)

    Hi
    I purchased a Creative T7700 Speaker system and DTS-100 Decoder the other week but so far have had no luck getting it to work. I use a Gigabyte GA-K8NS ULTRA motherboard which came with an audio combo kit that supports 7.1. I did everything the logical way, Connecting the black wire to black socket in speaker and red tabbed wire to the red socket in speaker, I then connected each speaker to the sockets at the back of subwoofer. Then I connected the audio cables (grey, blue, orange, black) from sub to the Decoder switch, then connected the other wires from switch to the audio jacks at the back of the PC(blue plug to blue socket, black plug to black socket, orange plug to orange socket), The I connected the hardwired plugs in decoder switch to the decoder. Finally, I plugged the mains power to the decoder and subwoofer but got no sound at all. I checked the 7.1 was set up on computer and it was.
    HAS ANYONE ANY IDEAS WHY I GET NO SOUND? :smileyindifferent:
    1. I know I have power cause the circular green light on volume and bass controller is on.
    2. I have the decoder set to analogue and tried 1,2 and 3.
    3. I have tried changing the decoder switch between decoder and PC.
    4. I checked I have the decoder and subwoofer set to 7.1
    5. I know it isnt a problem with computer or decoder because when I plug earphones into the green audio jack in either the PC or Decoder I get sound (Although I have the decoder switch set to "PC"meaning the decoder just sits there with its little green lights making no difference at all).
    PLEASE HELP WITH THIS PROBLEM.
    Thanks

    I also am having this issue. Where I have installed the software for the M and after doing so I plug it in and get the Driver installation that fails to find drivers. If I try to open the creative explorer or the firmware upgrade released yesterday both say no device attached.

  • PLS help: animate gif decoding problem

    i am making a gif animation decoders
    using http://www.fmsware.com/stuff/gif.html
    after i decoded the gif, i could only view the animation by ACD See, but cant view by web browser(it only show the last frame of the gif) !!
    Thanks all you guy ~~~

    It seems this animated gif decoder doesn't function properly. Perhaps, you may use Jimi (http://java.sun.com/products/jimi/) to decode animated gif image :
    Enumeration images=Jimi.createJimiReader(inputStream, Jimi.SYNCHRONOUS).getImageEnumeration();

  • Decode Problem in Oracle 8.1.6

    In our test database(Oracle 8.1.6), the SQL statement below does not give an "invalid number" error.
    select contact_id from news_contact
    Where 1 = decode(contact_id ,'pressoffice', 1,'k')
    and contact_id = 'pressoffice'
    However, when I ran this same SQL statement on our production database(Oracle 8.1.6), I get an "invalid number" error on the 'k' on the decode.

    BTW, I think that [ code ], [ code ] and similar tags, should be properly documented in this forums, and their usage should be mandatory. This seems to be a week point of the administrators of the Oracle forums. Also a forum-level promotion of decent code formating styles will make a difference.
    Taking an example at random from another thread, imagine that instead of having to read and understand queries like this:
    select COUNT(1) AS X1,x1.close_dt,x1.open_dt FROM W_SRVREQ_D X1,
    ( SELECT w_day_d.day_dt AS snapshot_date FROM (SELECT to_date(nvl(max(date_wid),'20030531'),'yyyymmdd')+1 AS snapshot_date FROM bt_fault_snapshot_f) f , w_day_d , (SELECT CASE WHEN to_number(to_char(sysdate,'hh24')) <18 THEN trunc(sysdate - 1) ELSE trunc(sysdate)
    END AS lastdate FROM dual) currdate WHERE w_day_d.day_dt >= f.snapshot_date AND w_day_d.day_dt <= currdate.lastdate) day WHERE X1.STATUS='CLOSED' group by x1.close_dt,x1.open_dt
    we will see only queries like that:
    SELECT COUNT(1) AS X1,
           x1.close_dt,
           x1.open_dt
      FROM W_SRVREQ_D X1,
          (SELECT w_day_d.day_dt AS snapshot_date
             FROM (SELECT to_date(nvl(max(date_wid),
                          '20030531'),
                          'yyyymmdd')+1 AS snapshot_date
                     FROM bt_fault_snapshot_f) f,
                          w_day_d,
                  (SELECT CASE
                          WHEN to_number(to_char(sysdate,'hh24')) < 18  
                          THEN trunc(sysdate - 1)
                          ELSE trunc(sysdate)
                          END AS lastdate
                     FROM dual) currdate
            WHERE w_day_d.day_dt >= f.snapshot_date
              AND w_day_d.day_dt <= currdate.lastdate) day
    WHERE X1.STATUS = 'CLOSED'
    GROUP BY x1.close_dt,
              x1.open_dt

  • Nikon Jpeg decoding problem.

    Jpeg files saved with the ICC profile "Nikon sRGB 4.0.0.3001" by Nikon PictureProject do not load properly using Java ImageIO.read(). The image is far too dark, but the colors are not swapped.
    This appears to be similar to the problems reported in bugid 6246622, which was fixed in 1.5_04 and is now closed.
    I tested this using Java version 1.5.0_06. The following code provides a workaround
        ImageInputStream iis = ImageIO.createImageInputStream(file);
        Iterator<ImageReader> iir = ImageIO.getImageReaders(iis);
        boolean looking = true;
        ImageReader reader = null;
        ImageReadParam param = null;
        while(looking && iir.hasNext()) {
            reader = iir.next();
            reader.setInput(iis);
            param = reader.getDefaultReadParam();
            Iterator it = reader.getImageTypes(0);
            while (looking && it.hasNext()) {
                ImageTypeSpecifier type = (ImageTypeSpecifier) it.next();
                ColorSpace cs = type.getColorModel().getColorSpace();
                if ( cs.isCS_sRGB() ) {
                    param.setDestinationType(type);
                    looking = false;
                if ( cs.getType() != ColorSpace.TYPE_RGB ) {
                    looking = false;
        if (reader != null) {
            img = reader.read(0, param);
        }Does anyone have a better workaround for this other than using Toolkit or Applet.
    I will file this as a bug report, but the Bug Database is not responding at present.

    Sun has assigned this a bug id
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6372769

  • Image type1 /Decode problems

    A couple of years ago I have implemented a feature that colors an image without recoding the image samples using the /Decode entry of the image type1 dictionary. This is all according to PostScript Language Refence Manual 3rd edition pp. 298 and 299.
    Example:
    %!PS
    /DeviceCMYK setcolorspace
    72 144 translate
    360 144 scale
    <<
    /ImageType 1
    /Width 8
    /Height 1
    /ImageMatrix [8 0 0 1 0 0]
    /BitsPerComponent 8
    /DataSource < FF 00 00 00
                  00 FF 00 00
                  00 00 FF 00
                  00 00 00 20
                  00 00 00 00
                  00 FF FF 00
                  FF 00 FF 00
                  FF FF 00 00
    >
    /Decode [0 1 0 1 0 1 0 1]
    >> image
    showpage
    Changing the /Decode entry to:
    /Decode [0 1 0 1 0.4 1 0 1]
    Colors the image as if it had a background color of [0 0 0.4 0] yellow. With ghostscript and distiller 6, 7 and 8 this works.
    As of Acrobat 9 pro (and 9.4 for that matter) this no longer works.
    Does anyone know the reason for this change in the semantics or a patch that restores the original functionality?
    Thanks,
    Dieter Gehrke

    Must be a very OLD article then.  Image maps for navigation were common in the late 90's as were FRAMES and framesets.  Nobody builds web sites this way anymore.
    Frames are Evil
    http://apptools.com/rants/framesevil.php
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/

  • Charset decoding problem. UTF-8

    Hi,
    I'm using Jakarta Commons HttpClient and am having trouble reading the response to a GetMethod.
    // execute method
    byte[] bytes = method.getResponseBody();
    String response = new String(bytes, "UTF-8");
    // method.getResponseCharSet() returns "utf-8"
    System.out.println(response);Unfortunately this just displays garbage.
    I added code to iterate through and print out the value of each byte. Some come up negative which surprises me. If I put the first 50 or so values here maybe someone can identify what the problem is:
    031 -117 008 000 000 000 000 000 000 011 -115 086 075 111 -029 054 016 -066 -025 087
    008 -070 056 001 -078 090 -110 018 -011 -088 031 064 -110 -090 -040 093 036 -023 -042 -021
    108 015 069 015 -076 -060 -040 066 -012 048 036 058 -117 -004 -005 114 -122 018 035 -045 It should read
    <html><head><meta HTTP-EQUIV="pragma" CONTENT="no-cache">
    <script language="Javascript">...
    Thanks

    If the String object
    <html><head><meta HTTP-EQUIV="pragma"CONTENT="no-cache"><script language="Javascript">is transformed to a byte array with UTF-8 encoding then its elements are as follows.
    14 97 103 109 97 34 67 79 78 84 69 78 84 61 34 110 111 45 99 97 99 104 101 34 62 60 115 99 114 105 112 116 32 108 97 110 103 117 97 103 101 61 34 74 97 118 97 115 99 114 105 112 116 34 62Probably encoding does not coincide or your byte array is different from what intended.

  • Charset Decoding Problem

    Please let me know why this program doesn't work!
    ByteBuffer buffer = null;
    CharBuffer charBuffer = CharBuffer.allocate(100);
    buffer = ByteBuffer.wrap(new String("Server 10").getBytes());
    buffer.flip();
    Charset cs = Charset.forName("ISO-8859-1");
    CharsetDecoder cd = cs.newDecoder();
    cd.decode(buffer,charBuffer,false);
    System.out.println("Char Buffer " + charBuffer.toString());
    buffer.clear();
    This does not display any output at all.
    Please let me know ... if you have any clue .. on this!
    Thanks in Advance.

    Hi..thanks for the response.
    Yes..I did try that. It still gives the same output. I even tried a charBuffer.flip() too. No help !
    ByteBuffer buffer = null;
    CharBuffer charBuffer = CharBuffer.wrap(new String(""));
    PropertyConfigurator.configure("log.properties");
    buffer = ByteBuffer.wrap(new String("Server 10").getBytes());
    Charset cs = Charset.forName("ISO-8859-1");
    CharsetDecoder cd = cs.newDecoder();
    cd.decode(buffer,charBuffer,true);
    logger.debug("Decoding done");
    logger.info("Char Buffer " + charBuffer.toString());
    logger.info("Length = " + charBuffer.toString().length());
    buffer.clear();
    The output is ...
    2003 Jul 01 17:30:46 [main] DEBUG TestCharset - Decoding done
    2003 Jul 01 17:30:46 [main] INFO TestCharset - Char Buffer
    2003 Jul 01 17:30:46 [main] INFO TestCharset - Length = 0
    Any further clues will be really helpful.
    thanks in advance

  • US7ASCII decoding problem

    Hi!
    The database is Oracle 9.2. (based us7ascii, and stored hungarian strings(include é,á...))
    Client is OraClient10g, opsystem: win2k3 english.
    I use the latest odp.net in my .net application, and i dont know why i always get "?" character at "á","é"...
    I checked the registry, it contains: AMERICAN_AMERICA.US7ASCII at NLS_LANG.
    I tried to change it something else, and i tried to modify the current thred, session, and client language settings via OracleGlobalization class. Nothing helps...
    Can anybody help me?

    Hi!
    I undertand it, but the system is an sap with an oracle database,
    and they use us7ascii coding for database and hungarian language in sap.
    I used Alawi Alkaf 's workaround i used rawtohex() oracle function to get the string
    in hexa, so i can decode the string properly.

Maybe you are looking for