similar to: Hitting 500 status code on invalid UTF-8 byte sequence in params

Displaying 20 results from an estimated 1000 matches similar to: "Hitting 500 status code on invalid UTF-8 byte sequence in params"

2010 Mar 18
1
capitalize and utf8 international symbols
Hi there, Being a relatively happy Rails user I suddenly noticed that string#capitalize and friends do not play well with international characters well. Sample console session: $ ./script/console Loading development environment (Rails 2.2.3) >> $KCODE => "UTF8" >> "яблоко".capitalize => "яблоко" Where "Яблоко" was expected (Russian word
2008 May 06
1
Problem with ActionWebService and UTF-8 encoding
Hello, I have a Rails App which serve a Soap Web Service with ActionWebService. I accept 2 string parameters that must contain xml. The data sent are in UTF-8, but the non-ascii char (é, à ...) in the message are crippled at the end. I tested the app, database, html, ... all accept utf-8, a direct http post works well, but going through the web service broke the content. I tried to manually set
2005 Mar 16
1
Re: Unicode support
How about this: we expose the known conversions of wxMBConv to wxruby global methods. Then we create a $WXSTRING_TO_RUBY and $RUBY_TO_WXSTRING globals that has a reference to those procs. In the ruby-string to wxString typemap, we use ruby to invoke $WXSTRING_TO_RUBY and $RUBY_TO_WXSTRING. That way, if people want a different method, they can write one (even a pure-ruby one) that changes the
2010 Sep 23
2
rspec runner setting $KCODE considered harmful?
I ran across a problem today in which some code ran fine in regular operation but failed in a test case. I scratched my head and thought "why would running from within the test harness change the behavior of my code?" Clearly it was the Heisenberg uncertainty principle in action! :) I discovered the root cause was that the rspec runner is setting the magical ruby global, $KCODE, to
2006 Jan 05
1
unicode hacks - fixes for webrick and Safari
Hello! First, thank you Julian for the useful plugin ''unicode_hacks'' < http://julik.textdriven.com/svn/tools/rails_plugins/unicode_hacks/>. I have found some problems running my app in development on Webrick and looking at it with Safari (MacOS X 10.4.3, Safari 2.0.2). Some files are sent with different sizes (e.g. default css example, or controls.js ), and it
2008 Jun 18
2
[ win32utils-Bugs-20722 ] Windows::Error.get_last_error only returns the first character (PATCH)
Bugs item #20722, was opened at 2008-06-18 15:16 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=20722&group_id=85 Category: windows-pr Group: Code Status: Open Resolution: None Priority: 3 Submitted By: John Whitley (whitley) Assigned to: Nobody (None) Summary: Windows::Error.get_last_error only returns the first character (PATCH) Initial
2011 Apr 08
5
How to extend a helper using plugin?
Hello, I''m facing this problem while trying to extend the parse_redmine_links helper method in Redmine-1.1.0 (Rails-2.3.5) from my plugin. My idea is to use alias_method_chain so the extended version could call the original version and adjust the result to it''s liking. Anything I''ve tried so far exposes this behavior: the first render of a page uses the extended
2006 Mar 21
2
How do I get substring of utf-8 string?
I''m trying to get substring from a utf-8 encoded string. (say, first 50 characters of the string) String#[0..49] would give me the first 50 bytes not 50 characters.. I know there is jcode library, but it only let you count number of characters in utf-8 string. unicode gem doesn''t seem to help much. unicode_hacks gem seem to solve the problem, but it also seems to
2009 Jun 17
12
FasterCVS and Rails
Hello all, I''m trying to import some csv data (that has latin characters) using faster csv but I keep getting a MalformedCSVError: "Unclosed quoted field on line 1." "/ruby/lib/ruby/gems/1.8/gems/fastercsv-1.2.3/lib/faster_csv.rb:1592:in `shift''" I''ve tested the same code outside of the Rails application an it works fine. Can anyone help me? Here is
2006 Feb 15
1
where to set $KCODE
My application uses only UTF-8. Which is the canonical place to do something global like setting $KCODE? -- fxn
2010 Aug 05
5
asset_host and ActionMailer
After digging through the rails code to figure out why my asset_host wasn''t getting applied to emails, I realized that it''s because the config object in the context of a mailer is config.action_mailer and not config.action_controller. This means you need to set asset host separately for emails, as config.action_mailer.asset_host. Should this be considered a bug? Is it really
2007 Nov 13
1
win32-api idea - wide method first based on $KCODE
All, Currently, the Win32::API.new method will search for the function name, then the ''A'' (ANSI) name, and finally the ''W'' (Wide) name. The code looks something like this: fProc = GetProcAddress(hLibrary, TEXT(RSTRING(v_proc)->ptr)); if(!fProc){ VALUE v_ascii = rb_str_new3(v_proc); v_ascii = rb_str_cat(v_ascii, "A", 1); fProc =
2006 Jan 10
1
Validating Umlauts
Hi there, I''m building a rails application for German and English speakers. However, I''m having some problems validating German-specific characters (????). I have a tag-model which validates format of :name, :with => /^\w+$/. This throws an exception if german characters are used. My tables are all utf-8 and my environment.rb has the lines $KCODE = ''u''
2007 Mar 28
2
iconv does not work with french characters
Hello, I am trying to convert french characters into latin ones using inconv but I face some problems. Here is what I am doing in ruby console: >> $KCODE = ''u'' => "u" >> @x = ''x éèçà x'' => "x éèçà x" >> Iconv.new(''US-ASCII//TRANSLIT'', ''utf-8'').iconv @x => "x ???? x"
2005 Dec 09
1
utf-8 BIG problems
hey, ------------------ i have change my db to utf8-general-ci, now all the characters are correct in the database, i need this for exporting to pdf en excel. now i can also import from csv, characters like éàï.... But the display is then fucked up. i get wierd symbols ------------------- Another situation: I have seen a post here to add to environment.rb: $KCODE = ''UTF8''
2008 Oct 14
6
Disabling XML character escaping for to_xml
Currently, it appears to_xml will automatically escape any entities into their corresponding &XXX representation. There''s a piece in the documentation that says "If $KCODE is set to u and encoding set to UTF8, then escaping will NOT be performed." Unfortunately, this doesn''t appear to be the case. Even after following the docs and ensuring that default_charset is
2007 Apr 29
1
Chinese full-text support! Still fail-_-
Hi all, I want to use ferrent in my website but when i input chinese words, i have the same symptom like Chengcai. In order to fix it, i have reviewed all the topics about chinese support in our forum and tried all the way your guys suggested but still made any progress. i downloaded the latest version of ferret from svn. Thanks and regards. captain Chengcai He wrote: > Hello everyone!
2005 Aug 28
7
Unicode support in FXRuby 1.6
All, As some of you know, Jeroen has added support for Unicode strings in the unstable development version of FOX (version 1.5). I''m trying to plan ahead to decide how best to support this for FXRuby 1.6, but I don''t really know anything about Ruby''s support for Unicode or i18n in general. If you''re familiar with this topic (how/if Ruby deals with Unicode
2012 Feb 28
4
JIRA anyone?
I''m trying to evaluate what use I can make of JIRA with Rails/Ruby and am getting frustrated. The jira4r gem will install but the soap4r gem won''t load. literally: ''irb -r soap4r'' returns :cannot load such file... I also set this up in a Gemfile and tried to run this from the rails console:
2006 Jul 11
0
malformed utf-8 character error
Hi, I am using ajax scaffold generator with charset=iso-8859-9(Turkish)... Edit & Create buttons work correctly when there is no turkish chars in the current record. But, if there are turkish chars in any of the fields in the current row, buttons don''t work... (loading indicator simply spinning forever...) I put the KCODE=''u'' line in