similar to: unicode hacks - fixes for webrick and Safari

Displaying 20 results from an estimated 400 matches similar to: "unicode hacks - fixes for webrick and Safari"

2007 Dec 17
3
are index files cross-platform?
Hello! I am trying to read Ferret index files from Windows machine on my Mac G5 Leopard machine, but the following returns nil: Ferret::Index::IndexReader.new( index_paths ) Should this work? Are index files guaranteed to be platform independent or not? Is there any problem if files (top direectory) are renamed? izidor P.S. I can create the index myself and then everything works.
2006 Apr 27
3
Books, other resources for new Rails VPS sysadmin
Hello! Since Virtual Private Server seems to be the only way to run Rails apps without problems, so in the future I will need to become a Linux sysadmin. I plan on using debian (as per Ezra''s instructions in <http:// brainspl.at/pages/perfect_vps>). Rails VPS sysadmin is not the same as general Linux sysadmin, since only webserver, db and email are of interest (and of
2005 Dec 16
13
How to pass a collection to paginate?
There must be a better way to write this code: @project_pages, @projects= paginate :project, :per_page => 10, :conditions => ["account_id = ?", account] ?! If only I could pass the sub-collection account = ... @projects = account.project to paginate, instead of letting it extract it with a find :all + sql conditions Alain. -- Posted via
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
2006 Apr 23
0
Using unicode_hacks breaks Rails 1.1 RJS
All, I wasted an hour on this, so here''s a quick post to save you from the same. If you are using "unicode_hacks":http://julik.textdriven.com/svn/tools/rails_plugins/unicode_hacks/ for "multi-lingual support":[http://wiki.rubyonrails.com/rails/pages/HowToUseUnicodeStrings/versions/40] (i18n), there''s a gotcha - RJS templates will not work. The culprit is
2006 Jun 27
3
Decoding Unicode URLs Properly
Please help, I have an application I switched over to UTF-8, but I am unable to decode URLs with unicode characters in them properly. For instance, if I have "item=Pur%E9ed" as a parameter in my url, when it''s decoded by rails, it returns "Pur?ed" and not "Pur?ed". Is there an easy way to fix my controller to accept these characters properly?
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
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
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
2006 Jan 18
4
Ruby "htmlentities" replacement: code review please!
Hi Railers, For some time now I''ve been looking for a decent Rails equivalent of PHP''s "htmlentities" command, because ERB''s html_escape (or more commonly called as just "h", eg. <%=h @somevariable %> ) just doesn''t go far enough for me. Back in PHP land, I actually had an extended version of the htmlentities command to deal with
2011 Sep 14
1
Hitting 500 status code on invalid UTF-8 byte sequence in params
Hello Core, Background: with Redmine-1.2 on Rails-2.3.11 we''re experiencing a "500 Internal Server Error" every time a mail with invalid UTF-8 byte sequence is hitting the MailHandler (the exception comes from the DB complaining about invalid string in the INSERT statement.) Since we do care about internal errors we''ve installed exception_notification plugin and this
2006 Jul 22
10
Non English characters
Hi folks, Does anyone know how to tackle Swedish letters in Rails. Am I completely off track in thinking that it should be done using map or regex in some clever way? Bealach
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
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 30
15
i18n when?
Hi all, Just wondering... Are there any plans to include i18n support in Rails anytime soon? I guess this is about the only feature I''m realy missing in Rails. Any thoughts? Regards, Harm de Laat -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060130/63681052/attachment.html
2006 Jun 16
0
[ATTN] To all users of unicode_hacks
TO everyone who is making use of unicode_hacks! I have made irreversible changes to the plugin so that the routings are no longer overloaded. To call the character-bound routines, you need to use the "chars" or "u" accessors, as outlined in the docs http://julik.nl/code/unicode-hacks/index.html and in this blog post by Thijs:
2007 Nov 14
3
Connecting to Oracle from an Intel Mac -- arch. conflicts
Hi all, I''ve got a rather complex problem on my hands. I''m using Leopard (OSX 10.5) on an Intel Mac, with the standard Ruby and Rails installations. In order to get Rails to talk to Oracle, I upgraded the Rails gems to the latest release candidate (1.99), and installed the oracle adapter gem. So far so good. But the Oracle InstantClient is a PPC-only library. You
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''