French diacritical marks

Discussion in 'Java' started by adamskim, Dec 13, 2004.

  1. adamskim

    adamskim Guest

    Hi.

    I have a problem which I can't solve it myself.
    I want to read a text file which contain a french diacritical marks,
    like:


    / \ ^
    a a a

    and print it on System.out

    Unfortunately instead of first mark ('a' with accent) I get "?". Two
    others are printed good.
    I hope that you understand me. My English isn't very good, but I can't
    find solution on polish site.

    Michael
    adamskim, Dec 13, 2004
    #1
    1. Advertising

  2. adamskim

    JScoobyCed Guest

    adamskim wrote:
    > Hi.
    >
    > I have a problem which I can't solve it myself.
    > I want to read a text file which contain a french diacritical marks,
    > like:
    >
    >
    > / \ ^
    > a a a
    >
    > and print it on System.out
    >
    > Unfortunately instead of first mark ('a' with accent) I get "?". Two
    > others are printed good.
    > I hope that you understand me. My English isn't very good, but I can't
    > find solution on polish site.
    >
    > Michael


    Umm... I just wonder which french word contains the first 'a' with
    accent that you list.

    ---
    JSC
    JScoobyCed, Dec 13, 2004
    #2
    1. Advertising

  3. adamskim wrote:
    > I have a problem which I can't solve it myself.
    > I want to read a text file which contain a french diacritical marks,
    > like:
    >
    >
    > / \ ^
    > a a a
    >
    > and print it on System.out
    >
    > Unfortunately instead of first mark ('a' with accent) I get "?".


    No, I think it's the *second* one that goes wrong, because it's in
    ISO-8859-1 but not in ISO-8859-2 which is probably your platform
    default encoding, judging from your .pl email address.

    > Two
    > others are printed good.


    1. find out which character encoding is used in the file - probably ISO-8859-1
    2. find out which character encoding is used by your console - probably ISO-8859-2
    3. If the console encoding or font doesn't support the character, change it.
    4. If both encodings are the same, just write the file's *bytes*
    to System.out and don't mess with chars and Strings at all.
    5. If not, specify the file encoding while reading it and then print to System.out
    Michael Borgwardt, Dec 13, 2004
    #3
  4. adamskim

    Tilman Bohn Guest

    On Mon, 13 Dec 2004 08:19:38 +0700, JScoobyCed wrote:

    [...]
    > Umm... I just wonder which french word contains the first 'a' with
    > accent that you list.


    Par exemple: âge. ;-)

    Cheers, Tilman

    --
    `Boy, life takes a long time to live...' -- Steven Wright
    Tilman Bohn, Dec 13, 2004
    #4
  5. adamskim

    Real Gagnon Guest

    Real Gagnon, Dec 13, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Girish Sharma

    Diacritical marks in HTML?

    Girish Sharma, Nov 27, 2004, in forum: HTML
    Replies:
    11
    Views:
    3,981
    Jukka K. Korpela
    Dec 1, 2004
  2. Dado
    Replies:
    5
    Views:
    1,053
  3. Berteun Damman

    textwrap and combining diacritical marks

    Berteun Damman, Jun 28, 2007, in forum: Python
    Replies:
    1
    Views:
    328
    Berteun Damman
    Jun 28, 2007
  4. Paul Barry

    removing diacritical marks

    Paul Barry, Mar 17, 2006, in forum: Ruby
    Replies:
    2
    Views:
    222
    Paul Battley
    Mar 17, 2006
  5. jiverbean

    Diacritical marks in array don't translate

    jiverbean, Nov 11, 2005, in forum: Javascript
    Replies:
    15
    Views:
    217
    Dag Sunde
    Nov 12, 2005
Loading...

Share This Page