encoding

Microsoft SQL DB to MySQL DB

不问归期 提交于 2020-01-24 19:53:14
问题 I have seen tons of post on this, but I am not very familiar with the process and nothing has worked. My basic problem is I am trying to get data from a Microsoft SQL database (Using Microsoft Management Studio 2008) to convert and use in a MySQL database (using MySQL Workbench) I have tried to dump the .sql file but when I try to import into MySQL Workbench I get errors about it not being in the UTF-8 format. I tried several ways to get it to be that encoding (such as notepadd++ converting I

National characters in URI

妖精的绣舞 提交于 2020-01-24 16:17:35
问题 How should authors publish (by URI) resources with names containing non-ASCII (for example national) characters? Considering all the various parties (HTML code, browser sending request, browser saving file do disk, server receiving and processing request and server storing the file) all (possibly) using various encodings it seems nearly impossible to have it working consistently. Or at least I never managed. When it comes to web pages I’m already used to that and always replace national

National characters in URI

戏子无情 提交于 2020-01-24 16:15:21
问题 How should authors publish (by URI) resources with names containing non-ASCII (for example national) characters? Considering all the various parties (HTML code, browser sending request, browser saving file do disk, server receiving and processing request and server storing the file) all (possibly) using various encodings it seems nearly impossible to have it working consistently. Or at least I never managed. When it comes to web pages I’m already used to that and always replace national

Why does <textarea> display <> instead of <>?

两盒软妹~` 提交于 2020-01-24 12:49:08
问题 Shouldn't a browser's textarea display raw text? Look at the following snaps from this post, and pay attention to the <script> tag: 1- We can see the angled brackets around the script word: 2- Now look at the source of the page. We can see the angled brackets are represented by their HTML entities: 3- Click to edit the post and you'll see that the angled brackets are visible in the textarea--NOT their HTML entities: 4- Look at the XHR response from the server (when we clicked edit), we can

ruby 1.9 wrong file encoding on windows

允我心安 提交于 2020-01-24 09:06:47
问题 I have a ruby file with these contents: # encoding: iso-8859-1 File.open('foo.txt', "w:iso-8859-1") {|f| f << 'fòo'} puts File.read('foo.txt').encoding When I run it from windows command prompt ruby 1.9.3 I get: IBM437 When I run it from cygwin ruby 1.9.3 I get: UTF-8 What I expect to get is: iso-8859-1 Can someone explain what's happening here? UPDATE Here's a better description of what I'm looking for: I understand now thanks to Darshan that by default ruby will load files in Encoding

ruby 1.9 wrong file encoding on windows

谁说胖子不能爱 提交于 2020-01-24 09:06:13
问题 I have a ruby file with these contents: # encoding: iso-8859-1 File.open('foo.txt', "w:iso-8859-1") {|f| f << 'fòo'} puts File.read('foo.txt').encoding When I run it from windows command prompt ruby 1.9.3 I get: IBM437 When I run it from cygwin ruby 1.9.3 I get: UTF-8 What I expect to get is: iso-8859-1 Can someone explain what's happening here? UPDATE Here's a better description of what I'm looking for: I understand now thanks to Darshan that by default ruby will load files in Encoding

Can a file be read and written right back with small changes without knowing its encoding in C#?

▼魔方 西西 提交于 2020-01-24 03:21:05
问题 I need to download from FTP over 5000 files being .html and .php files. I need to read each file and remove some stuff that was put there by virus and save it back to FTP. I'm using following code: string content; using (StreamReader sr = new StreamReader(fileName, System.Text.Encoding.UTF8, true)) { content = sr.ReadToEnd(); sr.Close(); } using (StreamWriter sw = new StreamWriter(fileName + "1" + file.Extension, false, System.Text.Encoding.UTF8)) { sw.WriteLine(content); sw.Close(); } I

Encoding/Decoding multi-type fields in JSON golang

China☆狼群 提交于 2020-01-24 00:45:10
问题 I am trying to create a struct where a field can hold data of a few particular types, say int , string and a CustomType . I want to decode/encode this struct to/from JSON. How can we achieve this in go/golang? For example, I have a struct for the following definition: type MyData struct { Name string `json:"name"` Value int32 `json:"value"` Param <can be either int, string or CustomType> `json:"param"` } Where CustomType is type CustomType struct { Custom bool `json:"custom"` } Let's say I

Encoding/Decoding multi-type fields in JSON golang

允我心安 提交于 2020-01-24 00:45:10
问题 I am trying to create a struct where a field can hold data of a few particular types, say int , string and a CustomType . I want to decode/encode this struct to/from JSON. How can we achieve this in go/golang? For example, I have a struct for the following definition: type MyData struct { Name string `json:"name"` Value int32 `json:"value"` Param <can be either int, string or CustomType> `json:"param"` } Where CustomType is type CustomType struct { Custom bool `json:"custom"` } Let's say I

How to identify a language in utf-8 column in MySQL

℡╲_俬逩灬. 提交于 2020-01-23 18:28:29
问题 My question is how to find specific character set from utf-8 column in MySQL server? Please note that this is NOT Duplicate question, please read carefully what's asked, not what's you think. Currently MySQL does works perfectly with utf-8 and shows all types of different languages and I don't have any problem to see different languages in database. I use SQLyog to connect MySQL server and all SELECT results are perfect, I can see Cyrillic, Japanese, chinese, Turkish, French or Italian or