[Rails] Re: encoding issue

2012-01-24 Thread Santosh c
Any takers? On Tue, Jan 24, 2012 at 4:14 AM, Santosh c santoshc...@gmail.com wrote: Hi, From an external source I am getting data in the following format / encoding: http://www.mydomain.com/app?message=%003%000%009%009%003%004 how do I convert the message parameter into plain string

[Rails] Re: Encoding issue (I think): All apostrophes have changed to these odd characters after a database switch

2011-06-01 Thread Frederick Cheung
On May 31, 8:48 pm, daze dmonopol...@gmail.com wrote: On May 31, 9:41 am, Frederick Cheung frederick.che...@gmail.com wrote: Is it a problem if some articles were already cleaned by doing a search and replace, e.g. swapping all ’ for its corresponding proper symbol? Depends. if

[Rails] Re: Encoding issue (I think): All apostrophes have changed to these odd characters after a database switch

2011-05-31 Thread daze
So... the old database used what type of encoding? latin1? And the new one uses utf8? Is it a problem if some articles were already cleaned by doing a search and replace, e.g. swapping all ’ for its corresponding proper symbol? Really appreciate the help! On May 29, 2:19 pm, Frederick

[Rails] Re: Encoding issue (I think): All apostrophes have changed to these odd characters after a database switch

2011-05-31 Thread Frederick Cheung
On May 31, 1:01 pm, daze dmonopol...@gmail.com wrote: So... the old database used what type of encoding?  latin1?  And the new one uses utf8? It's your database, you tell me! Is it a problem if some articles were already cleaned by doing a search and replace, e.g. swapping all ’ for its

[Rails] Re: Encoding issue (I think): All apostrophes have changed to these odd characters after a database switch

2011-05-31 Thread daze
On May 31, 9:41 am, Frederick Cheung frederick.che...@gmail.com wrote: Is it a problem if some articles were already cleaned by doing a search and replace, e.g. swapping all ’ for its corresponding proper symbol? Depends. if you have replaced with pure ascii then it's not a problem. if

Re: [Rails] Re: Encoding issue (I think): All apostrophes have changed to these odd characters after a database switch

2011-05-31 Thread Walter Davis
If the browser is using a typeface (font) that doesn't include the precise character that your page encoding and HTML require, then you won't see that character. The glyph you describe sounds like the missing glyph character, and that's why I'm guessing you're seeing it. Another layer to

[Rails] Re: Encoding issue (I think): All apostrophes have changed to these odd characters after a database switch

2011-05-31 Thread daze
On May 31, 4:02 pm, Walter Davis wa...@wdstudio.com wrote: If the browser is using a typeface (font) that doesn't include the   precise character that your page encoding and HTML require, then you   won't see that character. The glyph you describe sounds like the   missing glyph character, and

Re: [Rails] Re: Encoding issue (I think): All apostrophes have changed to these odd characters after a database switch

2011-05-31 Thread Walter Davis
The missing glyph character is a feature of many different fonts -- it means literally, I don't have any glyph by that name in my table. The way you get rid of it is by providing an encoding and substitution escapes that convert the wide, wild world of Unicode typography into something

[Rails] Re: Encoding issue (I think): All apostrophes have changed to these odd characters after a database switch

2011-05-29 Thread Frederick Cheung
On May 29, 6:45 pm, daze dmonopol...@gmail.com wrote: I'm wondering if anyone can give any insight into how I could resolve the problem on this website: http://jdrampage.com/ basically, all the ’ are supposed to be apostrophes ( ' ), and quotes are messed up too... Is it possible to run

[Rails] Re: Encoding issue with file upload

2009-08-26 Thread Céd B .
Ok, i found a fix for this, using Iconv lib, and it seems to work correcty. But i still get an issue with accented character. If i get a surname with accented character, like Cédric, Iconv returns me C'edric. I've got similar problems with every accented character. I read somewhere that i

[Rails] Re: Encoding issue with file upload

2009-08-24 Thread Céd B .
Thank you for answers. Is there an easy way to clean up my file before parsing it? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to

[Rails] Re: Encoding issue with file upload

2009-08-21 Thread Alpha Blue
Céd B. wrote: Hello, I've got some issue while trying to upload and read csv file on my application. For some file, i get some odd character appearing when i print the result, but not in my logs. Here joined a screen to explain what i'm talking about. I think it's an encoding issue, so

[Rails] Re: Encoding issue with file upload

2009-08-21 Thread Alpha Blue
that's an encoding issue with nbsp; spaces. As a follow-up, it could also be due to a BOM (byte order mark) issue. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby

[Rails] Re: encoding issue

2009-06-03 Thread Mk 27
This works in a non-rails script: def enconvert(text) conv=Encoding::Converter.new(ISO-8859-1,UTF-8, :undef = :replace, :invalid = :replace) text.each { |ln| ln=conv.convert(ln) } end but in rails I still get an error, after converting the same page. SURELY

[Rails] Re: encoding issue

2009-06-03 Thread Mk 27
Well, I solved it using Encoding::Convert. The difference between each (which does not allow in place changes) and each_with_index had me hung up. Ruby newbie! I would still LOVE to know why/how iconv self-destructed tho... -- Posted via http://www.ruby-forum.com/.