Subject: Re: new-line (Re:GB in unicode on NT)

From: szingr <[email-masked]>
Date: Thu, 18 Dec 1997 20:20:08 +0800

FYI

/* FixCRLF takes a pointer to a wide character (Unicode) string and searches
*  for old-fashioned ASCII \n and \r characters and hammers them into Unicode
*  line and paragraph separator characters.
*/
void FixCRLF(wchar_t * ps)
{
        do {

                if (*ps == (wchar_t)'\n')       // translate linefeed to
                        *ps = 0x2028;           // Unicode line separator

                if (*ps == (wchar_t)'\r')       // translate carriage return to
                        *ps = 0x2029;           // Unicode paragraph separator

        }       while (*ps++ != (wchar_t)NULL);

}       // FixCRLF

----------
From:   Ji Zhang[SMTP:[email-masked]]
Sent:   Wednesday, December 17, 1997 3:39 AM
To:     [email-masked]
Subject:        Q: new-line (Re:GB in unicode on NT)

>        wchar_t         str[] = {0x8fd9, 0x662f};

Can str[] be a Chinese article ?
How to deal with new-lines or CRLFs ?
What are the values for CR LF in unicode ?
It seems I have to scan str[] one wchar by one wchar
and count the positions to draw an article.

Ji Zhang  <[email-masked]>