Changes between Version 16 and Version 17 of ObjectReference
- Timestamp:
- 2015-11-06 13:59:34 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ObjectReference
v16 v17 298 298 299 299 var b = gb.transformCharset(txt, from, to); 300 // Useful when servers send responsein a different charset than300 // Useful when servers send the response body in a different charset than 301 301 // what's declared in the content-type header or xml charset attribute. 302 // It takes the chars in txt and encodes asbytes using the 'from' charset.303 // Then it decodes the bytes using the tocharset, which almost always should be 'UTF-8'.302 // The function encodes the chars in 'txt' to bytes using the 'from' charset. 303 // Then it decodes the bytes to a string using the 'to' charset, which almost always should be 'UTF-8'. 304 304 // If a server sends UTF-8 declared as ISO-8859-1, use: 305 305 t = gb.transformCharset(t, 'ISO-8859-1', 'UTF-8');