iso-8859-1

Is iso-8859-1 supported in Silverlight?

ぃ、小莉子 提交于 2020-01-25 10:07:47
问题 this is a simple question: does Silverlight (3.0?) support this kind of encoding? Encoding c = Encoding.GetEncoding("iso-8859-1"); Calling this function in Silverlight 3.0 generate the following error. 'ISO-8859-1' is not a supported encoding name. Parameter name: name My idea is to parse some file client side and then upload only those part needed for my application. I know that I could upload the whole file and parse it server side but right now could be better having the feature client

How do I write out a text file in C# with a code page other than UTF-8?

感情迁移 提交于 2020-01-18 21:06:56
问题 I want to write out a text file. Instead of the default UTF-8, I want to write it encoded as ISO-8859-1 which is code page 28591. I have no idea how to do this... I'm writing out my file with the following very simple code: using (StreamWriter sw = File.CreateText(myfilename)) { sw.WriteLine("my text..."); sw.Close(); } 回答1: using System.IO; using System.Text; using (StreamWriter sw = new StreamWriter(File.Open(myfilename, FileMode.Create), Encoding.WhateverYouWant)) { sw.WriteLine("my text..

How do I write out a text file in C# with a code page other than UTF-8?

六眼飞鱼酱① 提交于 2020-01-18 21:06:25
问题 I want to write out a text file. Instead of the default UTF-8, I want to write it encoded as ISO-8859-1 which is code page 28591. I have no idea how to do this... I'm writing out my file with the following very simple code: using (StreamWriter sw = File.CreateText(myfilename)) { sw.WriteLine("my text..."); sw.Close(); } 回答1: using System.IO; using System.Text; using (StreamWriter sw = new StreamWriter(File.Open(myfilename, FileMode.Create), Encoding.WhateverYouWant)) { sw.WriteLine("my text..

How to distinguish en-dash from hyphen in Notepad++?

倖福魔咒の 提交于 2020-01-15 08:26:48
问题 Using Notepad++, I'm not able to distinguish an en-dash ( – ) from the standard hyphen ( - ). Surprisingly, both are represented with the latter. Is there a way to: visually distinguish them , or even better automatically replacing every en-dash with an hyphen when opening, or saving, the text file ? Using a RegEx to manually search and replace is not an option because I could forget to do it. I've installed Notepad++'s TextFX plugin that I know is good at handling this things, but I'm stuck.

How to distinguish en-dash from hyphen in Notepad++?

不问归期 提交于 2020-01-15 08:25:00
问题 Using Notepad++, I'm not able to distinguish an en-dash ( – ) from the standard hyphen ( - ). Surprisingly, both are represented with the latter. Is there a way to: visually distinguish them , or even better automatically replacing every en-dash with an hyphen when opening, or saving, the text file ? Using a RegEx to manually search and replace is not an option because I could forget to do it. I've installed Notepad++'s TextFX plugin that I know is good at handling this things, but I'm stuck.

Javascript -> Download CSV file encoded in ISO-8859-1 / Latin1 / Windows-1252

☆樱花仙子☆ 提交于 2020-01-13 12:08:15
问题 I have hacked together a small tool to extract shipping data from Amazon CSV order data. it works so far. here is a simple version as JS Bin: http://output.jsbin.com/jarako For printing stamps/shipping labels, I need a file for uploading to Deutsche Post and to other parcel services. I used a small function saveTextAsFile which i found on stackoverflow. Everything good so far. No wrong displayed special characters (äöüß...) in the output textarea or downloaded files. All these german post /

Javascript -> Download CSV file encoded in ISO-8859-1 / Latin1 / Windows-1252

这一生的挚爱 提交于 2020-01-13 12:08:14
问题 I have hacked together a small tool to extract shipping data from Amazon CSV order data. it works so far. here is a simple version as JS Bin: http://output.jsbin.com/jarako For printing stamps/shipping labels, I need a file for uploading to Deutsche Post and to other parcel services. I used a small function saveTextAsFile which i found on stackoverflow. Everything good so far. No wrong displayed special characters (äöüß...) in the output textarea or downloaded files. All these german post /

 encoding issue

假装没事ソ 提交于 2020-01-11 02:04:46
问题 I'm developing a website using PHP and these strange chars "" appears in my page, right on the top of it. My code is this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><?php echo '';?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> But when I see the source code in the browser, it shows this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1

中文乱码详解

ぃ、小莉子 提交于 2020-01-10 20:04:05
一、几种编码方式介绍 1、Unicode、UTF-8 和 ISO8859-1和乱码问题 在下面的描述中,将以"中文"两个字为例,经查表可以知道其GB2312编码是"d6d0 cec4",Unicode编码为"4e2d 6587",UTF编码就是"e4b8ad e69687"。注意,这两个字没有iso8859-1编码,但可以用iso8859-1编码来"表示"。 2. 编码基本知识 最早的编码是iso8859-1,和ascii编码相似。但为了方便表示各种各样的语言,逐渐出现了很多标准编码,重要的有如下几个。 2.1. iso8859-1 属于单字节编码,最多能表示的字符范围是0-255,应用于英文系列。比如,字母a的编码为0x61=97。 很明显,iso8859-1编码表示的字符范围很窄,无法表示中文字符。但是,由于是单字节编码,和计算机最基础的表示单位一致,所以很多时候,仍旧使用 iso8859-1编码来表示。而且在很多协议上,默认使用该编码。比如,虽然"中文"两个字不存在iso8859-1编码,以gb2312编码为例,应该是"d6d0 cec4"两个字符,使用iso8859-1编码的时候则将它拆开为4个字节来表示:"d6 d0 ce c4"(事实上,在进行存储的时候,也是以字节为单位处理的)。而如果是UTF编码,则是6个字节"e4 b8 ad e6 96 87"。 很明显

charsets in MySQL replication

让人想犯罪 __ 提交于 2020-01-04 12:22:11
问题 What can I do to ensure that replication will use latin1 instead of utf-8? I'm migrating between an MySQL 5.1.22 server (master) on a Linux system and a MySQL 5.1.42 server (slave) on a FreeBSD system. My replication works well, but when non-ascii characters are in my varchars, they turn "weird". The Linux/MySQL-5.1.22 shows the following character set variables: character_set_client=latin1 character_set_connection=latin1 character_set_database=latin1 character_set_filesystem=binary character