Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #24600
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: copyright symbol |
| Date | Wed, 04 Jun 2014 11:06:31 +0200 |
| Organization | PointedEars Software (PES) |
| Lines | 63 |
| Message-ID | <2339146.HsSRG6Ygpm@PointedEars.de> (permalink) |
| References | <V_adnebgvuRUPxPOnZ2dnUVZ_vudnZ2d@westnet.com.au> |
| Reply-To | Thomas 'PointedEars' Lahn <cljs@PointedEars.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| Content-Transfer-Encoding | 8Bit |
| X-Trace | solani.org 1401872807 5797 eJwVxsERACEIA8CWVEjwyiEo/Zfg3L4WxskKJ+hoNG2rx+4bNYvpuKJPQ+go0BX11dLI1PmzHikyEes= (4 Jun 2014 09:06:47 GMT) |
| X-Complaints-To | abuse@news.solani.org |
| NNTP-Posting-Date | Wed, 4 Jun 2014 09:06:47 +0000 (UTC) |
| User-Agent | KNode/4.12.4 |
| X-User-ID | eJwNyMERACAIA7CVEAHrOBZw/xH08ovPGJHLwsP8foC3okahzzZN+yUY9HWrWg+dohO8krazOrgYXVpQpfgDWkMV+A== |
| Face | iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg== |
| X-Face | %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&.<b';Md8`dH6iqhT)6C^.Px|[=M@7=Ik[_w<%n1Up"LPQNu2m8|L!/3iby{-]A+#YE}Kl{Cw$\U!kD%K}\2jz"QQP6Uqr],./"?;=4v |
| Cancel-Lock | sha1:E9NaGtqBXc1sBC3r6NMr1nDIYGc= |
| X-NNTP-Posting-Host | eJwFwQEBwDAIAzBLcAp0dmCdfwlPMsprG5WFfPno0xakjb+0axugrsfs4ZHUkC/RU70afD8Q5REJ |
| Xref | csiph.com comp.lang.javascript:24600 |
Show key headers only | View raw
Andrew Poulos wrote: > I have an MS SQL Server database with a copyright symbol in a field of > data type varchar(80). When this is read by JScript in a classic ASP and > then displayed in the page the symbol displays as a black diamond with a > question mark in it. That is a possible rendering of U+FFFD REPLACEMENT CHARACTER. It is used here because the code sequence leading to the character in the database (A9) is not a proper UTF-8 code sequence (A9 is reserved as continuation byte). <https://en.wikipedia.org/wiki/ISO-8859-1#Codepage_layout> > If I change the page's charset from > <meta charset="UTF-8"> > to > <meta charset="iso-8859-1"> > the symbol correctly displays as a copyright symbol. > > Why does changing the charset "fix" the display of the symbol? > > I'd rather keep the charset as UTF but I'm at a loss as to what's going > on. The term “charset” is historical and misleading. This “meta” element specifies the character *encoding* of the resource unless there is an HTTP “Content-Type” header field value that takes precedence. This client-side change has an effect, so you are not serving a “Content-Type” header field value with a ”charset” parameter; your server-side code is incomplete or in error. <http://www.w3.org/TR/2014/CR-html5-20140204/infrastructure.html#fetching-resources> UTF-8 is the Unicode encoding that uses 8 bits per code unit. A Unicode character, precisely its code point, can be encoded with up to four such code units. <http://unicode.org/faq/> > Do I need to change the data type? No. > Do I need to encode the symbol before it goes into the database? No, but it would be a good idea. > Do I need to unescape/decode the value from the database? Yes, you need to *re*code string values if the database uses a different character encoding than the document resource you are generating. This problem has very little to do with ECMAScript implementations. Next time, do research. <http://www.joelonsoftware.com/articles/unicode.html> -- PointedEars FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix> Please do not Cc: me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
copyright symbol Andrew Poulos <ap_prog@hotmail.com> - 2014-06-04 14:36 +1000
Re: copyright symbol "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-06-04 08:51 +0300
Re: copyright symbol "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-06-04 10:37 +0200
Re: copyright symbol Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-04 11:06 +0200
Re: copyright symbol Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-04 14:34 +0200
Re: copyright symbol "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-06-04 15:41 +0300
Re: copyright symbol Andrew Poulos <ap_prog@hotmail.com> - 2014-06-05 10:28 +1000
Re: copyright symbol "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-06-05 09:12 +0200
Re: copyright symbol Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-04 11:21 +0000
csiph-web