I am using json with unicode text, and having a problem with the IE8 native json implementation.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script>
var stringified = JSON.stringify("สวัสดี olé");
alert(stringified);
</script>
Using json2.js or FireFox native json, the alert() string is the same as...
Hi guys,
Probably, this question has been asked before, though, I'll ask it again.
Currently, I'm facing a problem with form encoding. When posting my form, all spaces are replaced by the "+" character. I would like to replace this "+" character by a real space.
Does someone has a PHP solution for this?
Thanks in advance.
Cheers, ...
Let's say I'm including a file which contains html. The html have characters as exclamation symbols, Spanish accents (á, ó). The parsed included text gets processed as symbols instead of their correct value. This happens on FF but not on IE (8).
I have tried the following functions:
htmlspecialchars, htmlentities, utf8_encode
include ...
I'm attempting to take an NSImage and convert it to a string which I can write in an XML document.
My current attempt looks something like this:
[xmlDocument setCharacterEncoding: @"US-ASCII"];
NSData* data = [image TIFFRepresentation];
NSString* string = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding];
//Put stri...
Hello all,
I'm looking for a Win32 equivalent of the .Net Encoding.GetEncoding Method to be used in Delphi7.
What I would like to achieve is to convert a Codepage ID (ie.: 28592) to a Codepage name (iso-8859-2 in this case).
I've found a Win32 function called GetCPInfoEx, but that returns a long CodePage name, and I need the short one...
I have a Perl client which is calling an http restlet service (put method). Some of the parameters in this call contain japanese text. When I printed the contents of these request parameters in the restlet service I found these chars garbled !
This is my PERL client code:
my %request_headers = (
'DocumentName' => $document_name...
Using the concepts from the sample code provided by Microsoft for loading HTML content into an IWebBrowser from an IStream using the web browser's IPersistStreamInit interface:
pseudocode:
void LoadWebBrowserFromStream(IWebBrowser webBrowser, IStream stream)
{
IPersistStreamInit persist = webBrowser.Document as IPersistStreamInit;
...
How to get back from encoded byte[] to java.security.Key?
import java.security.Key;
import javax.crypto.SecretKey;
import javax.crypto.KeyGenerator;
public class TestRSA {
public static void main(String[] args) throws Exception {
KeyGenerator kgen = KeyGenerator.getInstance("AES");
kgen.init(128);
SecretKey key = kgen...
I need to clean a string that comes (copy/pasted) from various office suite (excel, access, word) each with his own set of encoding.
I'm using json_encode for debugging purposes in order to being able to see every single encoded character.
I'm able to clean everything I found so far (\r \n) with str_replace, but with \u00a0 I have no l...
From the Python 2.6 shell:
>>> import sys
>>> print sys.getdefaultencoding()
ascii
>>> print u'\xe9'
é
>>>
I expected to have either some gibberish or an Error after the print statement, since the "é" character isn't part of ASCII and I haven't specified an encoding. I guess I don't understand what ASCII being the default encoding me...
Are there methods for encoding and decoding *XML* in .NET? I can't seem to find them and am wondering why they aren't there and what to use instead?
I need to encode an XML document and pass it through to a string parameter on a web service. It then needs to be decoded at the other end.
...
I have created an XML file using python. But the XML declaration has only version info. How can I include encoding with XML declaration like:
<?xml version="1.0" encoding="UTF-8"?>
...
Hi,
I'm trying to make some "social share" buttons at my site, but the urls I generate just don't get decoded by this services.
One example, for twitter:
private function twitter(e:Event):void {
var message:String = "Message with special chars âõáà";
var url:String = "http://www.twitter.com/home?status=";
var link:URLRequest = n...
Hi:
I Suddenly found that I have no idea about the concept of data format and the encoding.
For exmpale, what is the differences about the ascii/binary/base64/text-xml ?
For a real case, I am working with a web service whose parameter I have to define,however one of the parameter should be ascii,another is binary and the last is netcdf....
I want to do what's described in question 724043, namely encode the path components of a URI. The class recommended to do that is URIUtil from Commons HttpClient 3.1. Unfortunately, that class seems to have disappeared from the most recent version of HttpClient. A similarly named class from HttpClient 4.1, URIUtils, doesn't provide the s...
These two querys gives me the exact same result:
select * from topics where name='Harligt';
select * from topics where name='Härligt';
How is this possible? Seems like mysql translates åäö to aao when it searches. Is there some way to turn this off?
I use utf-8 encoding everywhere as far as i know. The same problem occurs both from t...
Hi,
I can't find a correct way to get the environment variable for the appdata path in python.
The problem is that my user name includes special characters (the german ae and ue).
I made a workaround wit PyQt for Vista and Windows 7 but it doesn't work for XP Systems.
Does anybody know the correct encoding of these environment variabl...
I'm using Spring/Roo for an app server, and need to be able to post some special characters. Specifically, characters like the Yen symbol, or Euro symbol. When I receive these characters on my server, and display them in console, they appear as "?". How can they be properly encoded and received?
...
Hi all,
I'm now trying to parse chrome bookmarks, but I encounter a problem. the bookmarks snippet is presented as follow:
{
"date_added": "12915566290018721",
"id": "16",
"name": "hao123\uFF0D\uFF0D\u6211\u7684\u4E0A\u7F51\u4E3B\u9875",
"type": "url",
"url": "http://www.hao123.com/"
}
...
I have a javascript file that lots of people have embedded to their pages. Since I am hosting the file, I have control over that javascript file; I cannot control the way it is embedded because lots of people is using it already.
This javascript file sends GET requests to my servlets, and the parameters passed with the request are recor...