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

C

Cree

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
 
S

Steve Pugh

Cree said:
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
 
C

Cree

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?
 
S

Steve Pugh

Cree said:
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
 
S

Safalra

Cree said:
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.
 
C

Cree

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top