asian font def's in CSS - prob's with unicode sequences ...

Discussion in 'HTML' started by Cree, Apr 15, 2005.

  1. Cree

    Cree Guest

    Hi,

    I'm trying to set up a couple of CSS styles for SIMPLIFIED and TRADITIONAL
    asian characters.

    Problem is, the font styles contain UNICODE sequences - ending in
    semi-colons, which prematurely terminates the style statement.

    Example for English char set:

    font: 14px Georgia, "Times New Roman", Times, serif;

    For Chinese Simplified Char set:

    font: 14px SimSun, 宋体

    the semicolon after the 1st unicode char sequence kind of destroys the
    statement.

    Anyone suggest a workaround for this?

    thanks...

    Cree
    Cree, Apr 15, 2005
    #1
    1. Advertising

  2. Cree

    Steve Pugh Guest

    "Cree" <> wrote:

    >I'm trying to set up a couple of CSS styles for SIMPLIFIED and TRADITIONAL
    >asian characters.
    >
    >Problem is, the font styles contain UNICODE sequences - ending in
    >semi-colons, which prematurely terminates the style statement.


    Why not encode your CSS file as UTF-8 and enter the unicode characters
    directly? If you can't encode as UTF-8 (or another encoding that
    covers all the characters you need) then learn how to escape
    characters in CSS - escaped characters in CSS do not end in a
    semi-colon.

    >Example for English char set:
    >
    > font: 14px Georgia, "Times New Roman", Times, serif;
    >
    >For Chinese Simplified Char set:
    >
    > font: 14px SimSun, 宋体
    >
    >the semicolon after the 1st unicode char sequence kind of destroys the
    >statement.


    That's not a "unicode char sequence". What you have done there is
    specified the use of a font called &#23435.

    Stop trying to use HTML style character entities in CSS.

    See http://www.w3.org/TR/CSS21/syndata.html#q24 for how to escape
    characters that aren't in your document's specified encoding.

    Steve


    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
    Steve Pugh, Apr 15, 2005
    #2
    1. Advertising

  3. Cree

    Cree Guest

    Steve: to make a long story short: I found the remedy: simply enclose the
    font family name in quotation marks.
    It actually works quite nicely.

    I don't know why, but every time I go to w3.org, I get a headache. "written
    by Scientists, For Scientists. Wanna quick answer, sorry, this is the
    school of Hard Knocks and Long Answers."

    My horn-rimmed glasses are just NOT thick enough or something..

    And if that's not unicode, I honesty don't know what it is. I've got a lot
    of chinese page, and it's all written in that stuff. The chinese font
    families are also defined that way. It's a strange alphabet, I didn't make
    it up, somebody in the Ming Dynasty did. And because they had no horn
    rimmed glasses, they now have 6 thousand little pictures that have to be
    represented by long silly English strings of numbers begining with
    anpersands and ending in semi-colons.

    I'd give all my Sushi for one Large Pepperoni Pizza.

    know what I mean?



    "Steve Pugh" <> wrote in message
    news:...
    > "Cree" <> wrote:
    >
    >>I'm trying to set up a couple of CSS styles for SIMPLIFIED and TRADITIONAL
    >>asian characters.
    >>
    >>Problem is, the font styles contain UNICODE sequences - ending in
    >>semi-colons, which prematurely terminates the style statement.

    >
    > Why not encode your CSS file as UTF-8 and enter the unicode characters
    > directly? If you can't encode as UTF-8 (or another encoding that
    > covers all the characters you need) then learn how to escape
    > characters in CSS - escaped characters in CSS do not end in a
    > semi-colon.
    >
    >>Example for English char set:
    >>
    >> font: 14px Georgia, "Times New Roman", Times, serif;
    >>
    >>For Chinese Simplified Char set:
    >>
    >> font: 14px SimSun, 宋体
    >>
    >>the semicolon after the 1st unicode char sequence kind of destroys the
    >>statement.

    >
    > That's not a "unicode char sequence". What you have done there is
    > specified the use of a font called &#23435.
    >
    > Stop trying to use HTML style character entities in CSS.
    >
    > See http://www.w3.org/TR/CSS21/syndata.html#q24 for how to escape
    > characters that aren't in your document's specified encoding.
    >
    > Steve
    >
    >
    > --
    > "My theories appal you, my heresies outrage you,
    > I never answer letters and you don't like my tie." - The Doctor
    >
    > Steve Pugh <> <http://steve.pugh.net/>
    Cree, Apr 25, 2005
    #3
  4. Cree

    Steve Pugh Guest

    Cree wrote:
    > Steve: to make a long story short: I found the remedy: simply enclose

    the
    > font family name in quotation marks.
    > It actually works quite nicely.


    Sounds like browsers are fixing your errors for you.

    > And if that's not unicode, I honesty don't know what it is.


    That seems to be very much the case. But we're not stopping your from
    finding out.

    Steve
    Steve Pugh, Apr 25, 2005
    #4
  5. Cree

    Safalra Guest

    Cree wrote:
    > I don't know why, but every time I go to w3.org, I get a headache.

    "written
    > by Scientists, For Scientists. Wanna quick answer, sorry, this is

    the
    > school of Hard Knocks and Long Answers."


    It's not so much a question of a *quick* answer, but of the *right*
    answer....

    > The chinese font families are also defined that way.
    > It's a strange alphabet,


    It's a syllabary, not an alphabet.

    > I didn't make it up, somebody in the Ming Dynasty did.


    It started in the Sheng dynasty, and was formalised in the Han dynasty.

    > they now have 6 thousand little pictures that have to be
    > represented by long silly English strings of numbers begining with
    > anpersands and ending in semi-colons.


    That's only because electronic computers were developed in American,
    and their creators didn't take into account the fact that not everybody
    uses English.

    --
    Safalra (Stephen Morley)
    http://www.safalra.com/hypertext/
    Safalra, Apr 25, 2005
    #5
  6. Cree

    Cree Guest

    thanks to both Steve and Safalra for enlightening (as in 'get the chi tied
    up') and bittersweet answers. i am somewhat ashamed by my lack of knowledge
    of a language much older and more complex - dare i say - than computers
    themselves.

    after all, a computer can throw the i-ching, but will never understand it.

    and.. since Safalra is obviously an old "amiga-head" like myself (the best
    computer known to man, with the worst fortune cookies thrown in...), i wish
    you all "short answers and long truth" in your journey toward binary
    fulfillment...

    cree
    Cree, Apr 27, 2005
    #6
    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. Jiong Feng
    Replies:
    0
    Views:
    819
    Jiong Feng
    Nov 19, 2003
  2. Thank Tank

    asian font family

    Thank Tank, Nov 29, 2006, in forum: HTML
    Replies:
    3
    Views:
    899
    Ben C
    Dec 5, 2006
  3. Sean Ross
    Replies:
    3
    Views:
    123
    Aredridel
    Dec 25, 2003
  4. Replies:
    7
    Views:
    158
  5. planetthoughtful

    Newbie: def must come before call to def?

    planetthoughtful, Mar 12, 2007, in forum: Ruby
    Replies:
    4
    Views:
    126
    Pit Capitain
    Mar 12, 2007
Loading...

Share This Page