I have an odd problem in IE. It has to do with how IE detects the encoding of an iframe based on its parent content. My application wraps the content of a page in an iframe, and sets the encoding of the parent window to UTF-8 through the Content-Type header. The content of the iframe does not set the encoding through the Content-Type, an...
My WPF application is reading a text file and populating a listbox.
Whenever I have text surrounded by a dash symbol i.e. "-", the line in notepad will look like this for e.g. "SAMPLE - TEXT"
When it displays it in the application, the dash turns into a question mark !?!?!?
I then have an Export button, which writes these back to a text...
i'm going through some practice problems, and i saw this code:
#include <stdio.h>
#include <string.h>
int main(void) {
char* s = "357";
int sum = 0;
int i = 0;
for (i = 0; i < strlen(s); i++) {
sum += s[i] - 48;
}
printf("Sum is %d", sum);
return 0;
}
can someone explain what the code does, especially the s...
Hello,
I got MySQL DB which contains UTF8 column with such "ТеÑ" records.
PHP's mb_detect_encoding() told me that this is UTF-8.
How can I transform this "horror" into something readable?
Thank you
...
Any way to convert the encoding of all the files within a VS solution (*.sln) directly inside Visual Studio? (I am using 2008).
Any Add-in for this effect?
...
When I try to display Vietnamese characters with the following code:
<?php
$str = "Nghệ thuật cắm hoa vải";
//echo utf8_encode(html_entity_decode(($str)));
echo html_entity_decode($str);
//echo $str;
?>
I get Ngh�? thu�?t c??m hoa va?i as a result.
Tried several option but couldn't make it. Any ideas?
...
I do an HTTP GET request for a page using the following URL in Safari:
mysite.com/page.aspx?param=v%e5r
The page contains a form which posts back to itself.
The HTML form tag looks like this when output by asp.net:
<form method="post" action="page.aspx?param=v%u00e5r" id="aspnetForm" >
When Safari POSTs this back it somehow converts t...
I am working on a CakePHP site saved in MacRoman char encoding. I want to change all the files to UTF-8 for internationalisation. For all the other files in the site this works fine. However, in the core.php file there is a security salt, which is a string with special characters ("!:* etc.). When I save this file as UTF-8 the salt g...
The character encoding starts to irritate me.
It took me a while to get everything from the DB in the right encoding on the screen, but with help from the i18n helper, this worked out.
Now I only have one more problem: saving text...
If i add some letters with accents (eg é ç ...) in a text field and want to save it, already in my contro...
As per question how to i create a a file that also includes the Byte Order Mark?
Having some trouble displaying some chars because the csv viewer cannot display the chars correctly without the BOM.
Appreciate any help.
EDIT To Include code:
string attachment = string.Format("attachment; filename=results_{0}_to _{1}.csv", startDate.To...
Hi,
I'm getting my head around encryption and how encoding affects generation of the keys and initialization vectors.
I'm working with a TripleDESCryptoServiceProvider which requires 24 byte key and 8 byte initialization vector using ASCII encoding. If i decide to use a different encoding , how will this affect generation of the key a...
I'm trying to include all the Unicode whitespace characters in a LaTeX document as verbatim text (e.g. \verb#start end#), but I've gotten three different results:
With no packages, the spaces are simply not there in the PDF file.
with \usepackage[utf8x,utf8]{inputenc} I get an error: "Unicode char \u8: not set up for use with LaTeX."
...
I use ruby reading a web page, and its content is:
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=GB2312" />
</HEAD>
<BODY>
中文
</BODY>
</HTML>
From the meta, we can see it uses a GB2312 encoding.
My code is:
res = Net::HTTP.post_form(URI.parse("http://xxx/check"),
{:query=>'x...
Given this code in Java:
FileOutputStream os = new FileOutputStream("/tmp/test.dat");
os.write(0x14);
os.write(0xfe);
os.write(0xae);
os.write(String.valueOf((char) 0x14).getBytes("UTF-8"));
os.write(String.valueOf((char) 0xfe).getBytes("UTF-8"));
os.write(String.valueOf((char) 0xae).getBytes("UTF-8"));
...
Hi guys
I have just encountered something rather strange, I use the Zend Framework 1.10 with the Zend_Db_Table module to read some data from a databse. The database itself, the table and the fields in question all have their collation set to "utf8_general_ci" and all special chars appear correctly formatted in the DB when checked with p...
Hello,
I have a function for sending mail from PHP and I want to be albe to send Czech letters, like ř,ě,š,č,ř,ž,ý,á,é ..
The function goes like this:
function sendMail($to, $from, $subject, $body) {
$headers = "From: $from\r\n";
$headers .= "Content-type: text/html\r\n";
$body = iconv("UTF-8", 'ISO-8859-2', $body);
$content = "<ht...
I'm trying to migrate a sinatra application to ruby 1.9
I'm using sinatra 1.0, rack 1.2.0 and erb templates
when I start sinatra it works but when I request the web page from the browser I get this error:
Encoding::CompatibilityError at /
incompatible character encodings: ASCII-8BIT and UTF-8
all .rb files has this header:
#!/usr/b...
I've been trying to Base64 encode image data from the user (in this case a trusted admin) in order to skip as many calls to the BlobStore as I possibly can. Every time I attempt to encode it, I recieve an error saying:
Error uploading image: 'ascii' codec can't decode byte 0x89 in position 0: ordinal not in range(128)
I've googled the...
For some reason (it's a long story) I need to change the accents with their 'normal' counterparts.
I'm doing this:
$array = array(
'ò' => 'o',
'ó' => 'o',
'à' => 'a',
'è' => 'e',
'é' => 'e',
'ù' => 'u',
);
return str_replace(array_keys($array), array_va...
Given protocol, username, password, hostname, port and path what is the easiest way to get a (properly encoded) URL
There are similar questions already asked but:
java.net.URI seems to not allow to pass the password
java.net.URLEncoder makes me split the path into components and encode each
...