how do i translate non-ascii chars???

Ask a Question related to FreeBSD, Design and Development.

  1. #1

    Default how do i translate non-ascii chars???

    l
    Guys,

    I've got sseveral HTML files with O-aigu and O-grave and
    others (these files were composed on a Mac. Rather than
    display as ['] (apostrophes) or backticks, they are rendered
    in full 8859-1.

    How to I translate these > 128 range characters? I'm
    wedged.

    thanks in advance,

    gary





    --
    Gary Kline [email]kline@thought.org[/email] [url]www.thought.org[/url] Public service Unix

    Gary Kline Guest

  2. Similar Questions and Discussions

    1. translate unicode chars hexadecimal encoded to iso-8859-1
      Hi, I'm trying to translate utf8 char encoded into a hexadecimal code, i don't success with it. I know to translate hexa to ascii with...
    2. receiving ??? chars instead of "special" chars
      Hello i have a strange problem i made a online catalogue and must submit orders to a remote server I need to connect to a remote webservice on ...
    3. please translate
      prototype the new documentation says "this was actionscript1 way of implementing inheritance. If you're using actionscript2, you don't need this...
    4. How to translate value in URL
      Hi All, I have a nagging problem. I try to put a value of the autonumber field of a record into a string so it can be read in a new page. In...
    5. maths for translate
      does anyone know the real maths behind the 3d translate. I want to take a point in a 3d world then set its rotation in xyz, then finally move...
  3. #2

    Default Re: how do i translate non-ascii chars???

    On Sunday 20 February 2005 10:51 pm, Gary Kline wrote:
    > l
    > Guys,
    >
    > I've got sseveral HTML files with O-aigu and O-grave and
    > others (these files were composed on a Mac. Rather than
    > display as ['] (apostrophes) or backticks, they are rendered
    > in full 8859-1.
    >
    > How to I translate these > 128 range characters? I'm
    > wedged.
    When people do this, they are supposed to use the á, à,
    and etc. Then, their browser does the correct display on their OS.

    Kent
    >
    > thanks in advance,
    >
    > gary
    --
    Kent Stewart
    Richland, WA

    [url]http://users.owt.com/kstewart/index.html[/url]
    Kent Stewart Guest

  4. #3

    Default Re: how do i translate non-ascii chars???

    On Sun, Feb 20, 2005 at 11:54:49PM -0800, Kent Stewart wrote:
    > On Sunday 20 February 2005 10:51 pm, Gary Kline wrote:
    > > l
    > > Guys,
    > >
    > > I've got sseveral HTML files with O-aigu and O-grave and
    > > others (these files were composed on a Mac. Rather than
    > > display as ['] (apostrophes) or backticks, they are rendered
    > > in full 8859-1.
    > >
    > > How to I translate these > 128 range characters? I'm
    > > wedged.
    >
    > When people do this, they are supposed to use the á, à,
    > and etc. Then, their browser does the correct display on their OS.
    >
    I didn't explain myself very well, sorry. Befow is a line
    from od -c on the index.html file. I'm not sure how this
    will be rendered in the different mailers, but in mutt with
    nvi, the "B" is surrounded by two iso8859-1 characters.
    In mozilla, same way. It is meant to be `B'. I've got over
    28 files with what should be apostrophes and bcktcks rendered
    this way. putchar() outputs these characters in 8859 form
    --as characters. printf("0%o", ch); gives me their octal
    values. But trying to catch them with getchar() and it
    fails. gcc says that '\0325' is a dounle-wide.

    Maybe "od -c" is seeing this file as 16-bit characters...


    r h y m i n g Ô B Õ w o r d

    gary


    --
    Gary Kline [email]kline@thought.org[/email] [url]www.thought.org[/url] Public service Unix

    Gary Kline Guest

  5. #4

    Default Re: how do i translate non-ascii chars???

    On Monday 21 February 2005 03:00 pm, Gary Kline wrote:
    > On Sun, Feb 20, 2005 at 11:54:49PM -0800, Kent Stewart wrote:
    > > On Sunday 20 February 2005 10:51 pm, Gary Kline wrote:
    > > > l
    > > > Guys,
    > > >
    > > > I've got sseveral HTML files with O-aigu and O-grave and
    > > > others (these files were composed on a Mac. Rather than
    > > > display as ['] (apostrophes) or backticks, they are rendered
    > > > in full 8859-1.
    > > >
    > > > How to I translate these > 128 range characters? I'm
    > > > wedged.
    > >
    > > When people do this, they are supposed to use the á,
    > > à, and etc. Then, their browser does the correct display on
    > > their OS.
    >
    > I didn't explain myself very well, sorry. Befow is a line
    > from od -c on the index.html file. I'm not sure how this
    > will be rendered in the different mailers, but in mutt with
    > nvi, the "B" is surrounded by two iso8859-1 characters.
    > In mozilla, same way. It is meant to be `B'. I've got over
    > 28 files with what should be apostrophes and bcktcks rendered
    > this way. putchar() outputs these characters in 8859 form
    > --as characters. printf("0%o", ch); gives me their octal
    > values. But trying to catch them with getchar() and it
    > fails. gcc says that '\0325' is a dounle-wide.
    >
    > Maybe "od -c" is seeing this file as 16-bit characters...
    >
    >
    > r h y m i n g Ô B Õ w o r d
    Did you try -oc or -hc. I have one file that I translate from a Mac .doc
    into html and his bullets translate into what vi sees as the Yen
    symbol. I was always able to cut and paste into vi and then supply the
    proper character. The problem is that the apostrophe is probably best
    handled as "´". There isn't a comparable name for the grave. I
    did the bullet translate with something like ":.,$s/¥/\•/",
    knowing that it would not appear as a bullet on some computers. I
    followed the 80/20 rule and translated it for the PC's.

    I have always used the table in Castro's book as the source. She created
    a table that works between OSes. Some things such as your grave do not
    translate from one system to another. I do not use those characters in
    my html. The visual value is only as good as your worst mistake.
    Something that doesn't display properly will be viewed as an error by
    the viewer.

    Kent
    >
    > gary
    --
    Kent Stewart
    Richland, WA

    [url]http://users.owt.com/kstewart/index.html[/url]
    Kent Stewart Guest

  6. #5

    Default Re: how do i translate non-ascii chars???

    Gary Kline wrote:
    > I've got sseveral HTML files with O-aigu and O-grave and
    > others (these files were composed on a Mac. Rather than
    > display as ['] (apostrophes) or backticks, they are rendered
    > in full 8859-1.
    >
    > How to I translate these > 128 range characters? I'm
    > wedged.
    What about 'man iconv'? You can also open such a file in Vim with ':e
    ++enc=macroman file.html' or something.

    --

    Regards,
    Karel Miklav

    Karel Miklav Guest

  7. #6

    Default Re: how do i translate non-ascii chars???

    On Sun, Feb 20, 2005 at 10:51:49PM -0800, Gary Kline wrote:
    > I've got sseveral HTML files with O-aigu and O-grave and
    > others (these files were composed on a Mac. Rather than
    > display as ['] (apostrophes) or backticks, they are rendered
    > in full 8859-1.
    >
    > How to I translate these > 128 range characters? I'm
    > wedged.
    [url]http://tidy.sourceforge.net/[/url]
    [url]http://www.w3.org/People/Raggett/tidy/[/url]

    Both are in ports.

    Cheers,

    Matthew

    --
    Dr Matthew J Seaman MA, D.Phil. 8 Dane Court Manor
    School Rd
    PGP: [url]http://www.infracaninophile.co.uk/pgpkey[/url] Tilmanstone
    Tel: +44 1304 617253 Kent, CT14 0JL UK

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.0 (FreeBSD)

    iQCVAwUBQhr5B5r7OpndfbmCAQJCPwQAnGHrYarf0I2kg/PEHO64C3eSrTyXgi5n
    iYoXd0GaPg8ymG0/mbP+lrNEQ7pdDSX+LMA4vU/fqA+UY5j6Kb40HS4Mj1ANBUNJ
    10EuaeNbKc2ymgVTYRDT34DfpWNpmBF95A9cYvng4Q8hStF1fB X1QkZH98ytrq5o
    qYxA+cPY2/s=
    =A4Gc
    -----END PGP SIGNATURE-----

    Matthew Seaman Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139