Skip to main content
Participant
August 23, 2007
Question

Display chinese word within cfoutput

  • August 23, 2007
  • 4 replies
  • 1251 views
Chinese word can be display in HTML code (.cfm file) by unicode, however, due to unicode with #, it can not display wihin cfoutput, any one experience in this issue?
    This topic has been closed for replies.

    4 replies

    Inspiring
    August 24, 2007
    tingtg wrote:
    > Well,what about when we need to display the unicode/chinese word
    > within cfoutput, does it work? pls advise,Thank you.

    those examples are all output via cfoutput.

    i'm not sure what you mean or what exactly you're trying to do. are you saying
    you're using NCR (numerial char reference of the form '&#N;' where N is a
    decimal/hexadecimal number) for your text? if so, that shouldn't be necessary
    these days.
    BKBK
    Community Expert
    Community Expert
    August 24, 2007
    what about when we need to display the unicode/chinese word within cfoutput

    If there is no expression or variable to evaluate, then there is no need for cfoutput. You should just display the characters directly, thus

    &#116 &#105 &#110 &#103 &#116 &#103

    Alternatively, you could store the characters in a string variable. You would then have to escape every # symbol with another #. The result would be something like

    <cfset name ="&##116 &##105 &##110 &##103 &##116 &##103">
    <cfoutput>#name#</cfoutput>

    tingtgAuthor
    Participant
    August 24, 2007
    Well,what about when we need to display the unicode/chinese word
    within cfoutput, does it work? pls advise,Thank you.
    Inspiring
    August 23, 2007
    tingtg wrote:
    > Chinese word can be display in HTML code (.cfm file) by unicode, however,
    > due to unicode with #, it can not display wihin cfoutput, any one experience
    > in this issue?

    what unicode char uses "#"?

    unicode & cf works plenty fine:

    http://www.sustainablegis.com/unicode/index.cfm
    http://www.sustainablegis.com/unicode/greekTest.cfm