similar to: How do I get substring of utf-8 string?

Displaying 20 results from an estimated 100 matches similar to: "How do I get substring of utf-8 string?"

2005 Dec 21
10
Investigating Unicode. Take 2, with nastities and allegations.
Well, I see that my last email hasn''t generated any reaction from the Rails core team. It looks like all of them are the happy users of "plain text" (which, as we know by now, doesn''t exist, but still). I apologize in advance for the sore bitterness of this message but I see that the Rails-core STILL, despite all of the efforts, sees these issues as something
2016 Jul 07
2
String encoding problem
If you print: "\xc9\x82\xbf" you get "\u0242\xbf" But if you try and evaluate that string you get: > "\u0242\xbf" Error: mixing Unicode and octal/hex escapes in a string is not allowed (Probably will only happen on mac/linux with default utf-8 encoding) Hadley -- http://hadley.nz
2006 Jun 25
7
Unicode HOWTO?
I am disappointed about the (seeming) lack of Unicode support in Rails. Is there a howto about working the most important limitations? For example, figuring out the length of an entered word: "???".length() will return 6, not 3. So if there is a maximum number of characters a user is allowed to enter, this won''t work as it should -- it treats strings as byte arrays instead
2015 Apr 24
4
FYI: dovecot (008632bdfd2c) compilation woes, and minor glitch regarding update-version.sh
Hi ? 1) I'm trying to compile a recent hg dovecot version (008632bdfd2c) at a FBSD10-STABLE system without success: libtool: compile: cc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib-test -I/usr/local/include -DUDHRDIR=\"../../src/lib-fts\" -DDATADIR=\"/usr/local/share/dovecot\" -DTEST_STOPWORDS_DIR=\"../../src/lib-fts\" -I/usr/local/include
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
2016 Jul 07
2
String encoding problem
On Thu, Jul 7, 2016 at 10:11 AM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > On 07/07/2016 10:57 AM, Hadley Wickham wrote: >> >> If you print: >> >> "\xc9\x82\xbf" >> >> you get >> >> "\u0242\xbf" >> >> But if you try and evaluate that string you get: >> >>> "\u0242\xbf"
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?
2015 Aug 26
2
classicupgrade
I have a Samba 3.6 PDC (ClearOS) that I want to migrate to Sernet Samba 4.2 AD on a Centos7-arm box. So I am reading: https://wiki.samba.org/index.php/Migrating_a_Samba_NT4_domain_to_a_Samba_AD_domain_%28classic_upgrade%29 And trying to figure out what files I need. Note this is a totally NEW box, I need to copy over the needed files. So do I move all of the .tdb files? There are actually
2016 Jul 07
2
String encoding problem
>>> I'm not sure what should happen here, but that's not a legal string in a >>> UTF-8 locale, so it's not too surprising that things go wonky. >> >> Here's bit more context on how I got that sequence of bytes: >> >> x <- "?????" >> y <- iconv(x, to = "Shift-JIS") >> Encoding(y) >> y >>
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
2010 Feb 03
1
Unicode related query
Greetings, I am able to get a english word list in <file> by using the following command cat <file> | tr -sc A-Za-z '\012' My question is how to specify unicode character and ASCII. Specifically text text file containing 3 byte sequence starting with \x0e in the tr command. I am able to see the character using: echo -e '\xe0\xa5\xbf' What regex incantation would
2007 Jan 12
9
Nil object in E1 capture the order
I''m following the depot application in the rails bible Agile Web Development with Rails. In interation E1 NoMethodError in Admin#checkout Showing app/views/admin/checkout.rhtml where line #12 raised: You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured while evaluating nil.include? Extracted source (around line #12):
2010 Feb 16
7
YAML, UTF-8, TextMate, Notepad
This is not a question but a report on the difficulties I had and the solution I found with respect to UTF-8, YAML::load, and Ruby/Rails. Comments are appreciated. - - - I had been struggling for two days to get UTF-8 working in my Rails app. I had/have a localization file, lib\locale\de.yml, that had iso-8859-1 encoding. I could not get that to display properly. Marnen, quite correctly,
1999 Feb 25
2
smbtar problem
I was using smbtar to test backing up an NT server, everything works fine except that for quite a lot of the files it has an error downloading them(probably 2/3 of them actually). All it says is : Error reading file \dir\dir\file. Got 0 bytes Didn't get entire file. size=533, nread=0 I could see this happening if the file were opened exclusively such as the paging file, but to my knowledge
2006 Aug 27
6
how to get the words of a query
Hi, Using aaf to search pages, I wanted to present excerpts from the texts even when more than one term was used in the search. I came to some results, despite the difficulty caused by Unicode+ruby. The last problem I''m faced is to get the query words, without the logical articulation chars if any. Is there a clean way to get them ? -- Jean-Christophe Michel
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:
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
2015 May 04
0
FYI: dovecot (008632bdfd2c) compilation woes, and minor glitch regarding update-version.sh
On 04/24/2015 10:00 PM, Michael Grimm wrote: > Hi ? > > 1) I'm trying to compile a recent hg dovecot version (008632bdfd2c) at a FBSD10-STABLE system without success: > > libtool: compile: cc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib-test -I/usr/local/include -DUDHRDIR=\"../../src/lib-fts\" -DDATADIR=\"/usr/local/share/dovecot\"
2005 Jan 29
4
format question
how can I get a float to always print two decimal places? Thanks, Jamie
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