character-encoding

String UTF-8 encoding with cyrillic in H2O

[亡魂溺海] 提交于 2020-01-04 07:01:44
问题 I load csv file of utf-8 encoding with cyrillic strings. After parsing in Flow interface - i see not cyrillic, but not readable symbols like "пїўпѕЂпѕ™пїђпѕ" How can i use utf-8 cyrillic strings in H2O? 回答1: This appears to be a bug in the Flow interface, but only in the setupParse command. If you continue through and do the import, the data gets imported correctly. I've reported the bug, with test data and screenshots (taken in Firefox) here: https://0xdata.atlassian.net/browse/PUBDEV-4640

String UTF-8 encoding with cyrillic in H2O

[亡魂溺海] 提交于 2020-01-04 07:01:31
问题 I load csv file of utf-8 encoding with cyrillic strings. After parsing in Flow interface - i see not cyrillic, but not readable symbols like "пїўпѕЂпѕ™пїђпѕ" How can i use utf-8 cyrillic strings in H2O? 回答1: This appears to be a bug in the Flow interface, but only in the setupParse command. If you continue through and do the import, the data gets imported correctly. I've reported the bug, with test data and screenshots (taken in Firefox) here: https://0xdata.atlassian.net/browse/PUBDEV-4640

Rails character encoding issue while using cache

纵饮孤独 提交于 2020-01-04 06:15:50
问题 I am using rails fragemnet cache to cache some html. Below is my code <% if @link.social_tags.present? %> <% cache(:action =>'pageui', :action_suffix => "#{@link.id}_tags") do %> <% @link.social_tags.each_with_index do |tag, index| %> <%= ", " if index > 0 %> <%= link_to tag.name, some_path(:tag => tag.id), :title => tag.name, :target => "_blank" %> <% end %> <% end %> <% else %> Still no tag for this Page. <% end %> I am getting some weird issue. First time when it doesn't have the fragement

How to identify encoding from hex values?

强颜欢笑 提交于 2020-01-04 06:03:48
问题 I have text on a website that displays like that: o¨ instead of ö I extracted the text out of the CMS and analysed it's hex values: the ö's that are displays correctly have c3 b6 - UTF-8 the ö's that are displayed incorrect have 6f cc 88 I couldn't find out what encoding this is. What's a good way to identify the encoding? 回答1: 6F is the UTF-8 (ASCII) encoding of "o", nothing spectacular. CC 88 is the UTF-8 encoding of U+0308, COMBINING DIAERESIS. You're simply looking at the decomposed form

How to convert text to unicode in Rails?

亡梦爱人 提交于 2020-01-04 04:17:14
问题 In my database, I have the following entry id | name | info 1 John Smith Çö ¿¬¼ As you can tell, the info column displays wrong -- it's actually Korean, though. In Chrome, when I switch the browser encoding from UTF-8 to Korean ('euc-kr', I think), I actually manage to view the text as such: id | name | info 1 John Smith 횉철 쩔짭쩌 I then manually copy the text into the info in the database and save, and now I can view it in UTF-8, without switching my browser's encoding. Awesome. Now I'd like to

Character Encoding in iframes

谁说胖子不能爱 提交于 2020-01-04 02:51:06
问题 I have a text file encoded in ISO-8859-1. If you view it in Google Chrome, it displays correctly. However, if you iframe it, it looks wrong. Also, it always looks wrong in Firefox. I have noticed this same behavior with various different servers and browsers. However, if I use Google Chrome and run the server and browser on the same machine, the iframe's content displays correctly. What should I do to make the file show up correctly in all situations? It seems like the browser should be able

What are special characters in E-Mail-Headers and when to use quotes?

瘦欲@ 提交于 2020-01-04 02:26:06
问题 I'm trying to send and read e-mail using PHP. So far I found out, that I have to encode special characters using the function mb_encode_mimeheader() , But I don't have to encode spaces. I also found out, that brackets in adress-filed don't work: (http://stackoverflow.com/questions/11989915/is-there-an-error-in-phps-imap-fetch-overview-function-when-reading-headers-w). For example PHP is unable to the header-section From: Admin [] <user@mail.tld> , but can read the header-section From: "Admin

HEXADECIMAL VALUE 0X03 is an invalid character

别说谁变了你拦得住时间么 提交于 2020-01-04 01:58:09
问题 This is the source of a web page <html lang="pl"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> </head> <body> <p>Da brow#a G�rn&#x3;icza<p> </body> </html> I need to browse this page and copy the text shown After that, I have pasted this text into an input text box of an asp.net mvc application in order to create a new record into the database. The meta charset of the layout page is "utf-8" If I go to Visual Studio 2013 in debug, when the create action of the

Java nio: How to read characters from memory mapped file with correct charset

孤街醉人 提交于 2020-01-04 01:57:08
问题 for a new project, I have to read the characters of a file (with configurable encoding) to handle the input. As some of these files can be quite large (> 100MB), I wanted to check out the Java nio's ability to memory map files for faster access. However, I was not able to figure out, how I am able to create something "Reader"-like to read from the MappedByteBuffer with the correct charset decoding. To create the MappedByteBuffer, I currently use: RandomAccessFile raFile = new RandomAccessFile

Java nio: How to read characters from memory mapped file with correct charset

拟墨画扇 提交于 2020-01-04 01:57:08
问题 for a new project, I have to read the characters of a file (with configurable encoding) to handle the input. As some of these files can be quite large (> 100MB), I wanted to check out the Java nio's ability to memory map files for faster access. However, I was not able to figure out, how I am able to create something "Reader"-like to read from the MappedByteBuffer with the correct charset decoding. To create the MappedByteBuffer, I currently use: RandomAccessFile raFile = new RandomAccessFile