similar to: How to use Chars in classes not derived from AR

Displaying 20 results from an estimated 9000 matches similar to: "How to use Chars in classes not derived from AR"

2010 Jul 16
1
Rails 3 bug: undefined method `<=>' for class `ActiveSupport::Multibyte::Chars'
I''m getting the following bug when I try to run rake db:migrate in Rails 3 beta 4: $ rake db:migrate --trace (in C:/Users/Adam/Documents/Aptana Workspace/QuestionBank) default formats are encoded in ISO-8859-1 ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == CreateUsers: migrating
2010 May 10
6
feedback on a few ActiveSupport::Multibyte patches
Hi all, In response to Rodrigo Rosas''s message about mb_chars.upcase not giving the expected result on 1.9, I''ve done some work in a fork to make String#mb_chars always return an instance of a proxy class, both with Ruby 1.8 and Ruby 1.9. The end result of the patch is (hopefully) to make Rails'' multibyte functionality behave the same way in 1.8.7 and 1.9.x.
2009 Nov 13
3
Encoding::UTF_8 missing?
I''ve just done a fresh reinstall of OS X Snow Leopard on my mac, and I''m having all kinds of problems with Rails, but the latest problem has me stumped. Whenever I run rake db:seed to populate my database I hit the following error: ** Invoke db:seed (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:seed rake aborted! uninitialized constant
2010 Jun 09
1
[patch] fix bytesize in exception template; multibyte titleize
Hi all, I wanted to draw some attention to a couple of very small multibyte-related patches I believe should be included before Rails 3.0 RC1: * Use String#bytesize rather than String#length in exception templates: This is a simple case where string length is checked, but bytes is needed, so it breaks with string with multibyte chars.
2010 Jun 10
9
Rails3 beta4 + Ruby 1.9
When I try rails console using Rails3 beta4 and Ruby 1.9.1-p378 I cannot save a record: > rails console Loading development environment (Rails 3.0.0.beta4) ruby-1.9.1-p378 > g = Game.new => #<Game id: nil, player_id: nil, versus_id: nil, finished: nil, created_at: nil, updated_at: nil> ruby-1.9.1-p378 > g.save NameError: undefined method `<=>'' for class
2013 Sep 05
1
Conversion error: Illegal multibyte sequence
Hello list, I've noticed this problem for a few years now, I think. I see it popped out now and then in discussions. But they always end before a solution is given. So let's try one more time :-) I have plenty of UTF-8 named files and directories. It's UTF-8 all round, I don't use anything else, so I have no doubt the byte sequences are correct in the filesystem (I happen to
2014 Sep 02
1
Creating users with non-ascii chars fails
Hi list! I'm trying to create a user with non-ascii characters in the name, but this fails: root at test-samba4:~# samba-tool user create foa --given-name='foa?' New Password: Retype Password: ldb_handler_fold: unable to casefold string [foa?] ldb_handler_fold: unable to casefold string [foa?] ldb_handler_fold: unable to casefold string [foa?] ldb_handler_fold: unable to casefold
2006 Oct 02
22
Multi Byte Strings
Hey guys, We''ve been talking about the multi-byte patch and I think it''s time to get feedback from you guys on a possible way forward. We can include ActiveSupport::Multibyte with rails 1.2, and update all of the relevant helpers to use the String#chars proxy. This will mean that none of the action view helpers will mangle multibyte strings. Similarly, if any Strings are being
2012 Sep 25
2
OpenSSH banner doesnot display multibyte characters like korean
Hello, The banner message displayed on the screen contain octal values instead of korean chars. Prior to ssh 5.1 the banner message would display the charaters properly. I understand that starting from 5.1 the message is passed through strnvis() function. I looked into documentation on strnvis and found that it does not support multibyte chars and doesnt work well with international chars.
2015 Mar 02
2
Errors on Windows with grep(fixed=TRUE) on UTF-8 strings
On Windows, grep(fixed=TRUE) throws errors with some UTF-8 strings. Here's an example (must be run on Windows to reproduce the error): Sys.setlocale("LC_CTYPE", "chinese") y <- rawToChar(as.raw(c(0xe6, 0xb8, 0x97))) Encoding(y) <- "UTF-8" y # [1] "?" grep("\n", y, fixed = TRUE) # Error in grep("\n", y, fixed = TRUE) : invalid
2005 Apr 14
2
Using idmap_rid backend, cannot browse home directory from XP
Samba version is 3.0.10 on Gentoo linux. I am trying to use idmap_rid backend in a Windows AD environment, the Linux PC acting only as a domain member. I am using idmap_rid because I need UID/GID predictability. I can log in to console correctly, and it shows the right user and the "Domain Users" as the group. When I use default winbind TDB, I can browse the home directory from an XP
2010 May 08
19
mb_chars.upcase and Ruby 1.9.2
I''m testing ruby-head through rvm but can''t get ''ação''.mb_chars.upcase == ''AÇÃO''... I get ''AçãO'' instead... This happens both for Rails 2.3.5 and Rails 3 beta 3... How can I get upcase to work correctly? Thanks in advance, Rodrigo. -- You received this message because you are subscribed to the Google Groups "Ruby
2009 Mar 09
10
Cucumber - RSpec matcher
I must be missing something obvious here but I cannot seem to see it. I have this step definition: When /entity named "(.*)" has a legal name "(.*)"/ do |name, legal| myentity = Entity.find_by_entity_common_name!(name.hll_keycase) myentity.entity_legal_name.should equal legal.hll_keycase end Which fails with this: And the entity named "Myuser" has a legal
2011 Sep 07
2
[LLVMdev] [cfe-dev] Unicode path handling on Windows
As was mentioned once before, the correct solution is to never use multibyte anywhere. Any Windows functions that currently return multibyte strings should be converted to their wide-string (unicode) equivalent, with the result converted to UTF-8. > From: Nikola Smiljanic <popizdeh at gmail.com> > > I think I got it this time. I realized that ::open and ::stat work just fine with
2002 Nov 13
1
Does the newest version support Mulitibyte NETBIOS name?
Dear Sir, I remember that I can use multibyte NETBIOS name (just as Traditional Chinese) in Microsoft Windows to talk with the previous version of samba (maybe 2.0.7). But since I use 2.2.3a (which is included in RedHat 7.3), the log file name is incorrect when the client use multibyte NETBIOS name. And when I use the newest version (2.2.6), if the client use multibyte NETBIOS name, then the
2007 Sep 13
1
chartr better
For example, the following changes are necessary when i convert a Japanese hiragana into katakana in chattr. R code: > chartr("\u3041-\u3093","\u30a1-\u30f3","\u3084\u3063\u305f\u30fc") --- R-alpha.orig/src/main/character.c 2007-09-05 07:13:27.000000000 +0900 +++ R-alpha/src/main/character.c 2007-09-13 16:10:21.000000000 +0900 @@ -2041,6 +2041,16 @@
2005 Jun 17
2
Illegal multibyte sequence error in pdbedit output
dear list, in the output of pdbedit -L -v heupink I'm getting these errors: convert_string_allocate: Conversion error: Illegal multibyte sequence(???p? ????????) Any ideas where to look..? Are these serieus errors..? (it looks as if the errors occur BEFORE the actual ldap connection is opened, so I guess they're not ldap related...) My samba is 3.0.14a, and system is sles9 Below find
2009 Oct 15
5
invalid multibyte character error
Hi. When I try to use multibyte characters in my rails controller I get an invalid multibyte characters error (<rails_app>/app/controllers/admin_controller.rb:6: invalid multibyte char (US-ASCII)). Here is my controller: contoller AdminController < ApplicationController def read @title = ''Заголовок страницы'' end end Here is my haml template extraction: ...
2011 Sep 07
0
[LLVMdev] [cfe-dev] Unicode path handling on Windows
The problem is not in the functions that return multibyte strings (the multibyte string is coming from argv) but in the functions that can't handle utf8 input on windows, such as ::open and ::stat. llvm::sys::fs module assumes utf8 input and I don't think this is true for windows. One solution would be to make the module work with multibyte strings as I've done, and the other one
2013 Feb 09
1
Samba 4 DC log.smd flooded with Conversion error
My machine is running samba 4.0.3 inside a DomU of Debian Wheezy. Following the Samba AD Howto and running Samba 4.0.3 successfully but with one pretty serious problem. When I try access the folder with 1000 files, the speed is *VERY* slow. After employ log level to 3, log.smbd is flooded with: ============================================= [2013/02/09 23:44:05.910717, 3]