473,395 Members | 1,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

SpiderMonkey-How do you make javascript’s string functions to handle multi-byte chars

1
How do you make javascript’s string functions (like toUpperCase() or substr()) run under SpiderMonkey to handle multi-byte characters.

For example:

var strTest = "ørnen på";
var strWork = strTest.toUpperCase();
print( strWork );

The result is øRNEN På

It should be ØRNEN PÅ

Thanks,

rapin
Oct 14 '06 #1
1 2361
acoder
16,027 Expert Mod 8TB
Works fine with UTF-8 and ISO-8859-1. Could try unicode or encoding using encodeURIComponent.
May 23 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

27
by: Peter Hansen | last post by:
Just been looking at Flash and ActionScript... In the vein of Jython, I wonder what it would take to build a Flython? (Lousy name, I know.) That would take Python source, presumably a subset...
16
by: fernandez.dan | last post by:
Hey I'm sorry if this is not the appropriate news group for this question. I was wondering if anyone has any recommendation for embbedding a script engine in a c++ application. I want to feed my...
15
by: Ian Osgood | last post by:
I just wanted to let folks know of one more reason not to use for/in loops on Arrays. In the following code: var u = for (var i in u) print(.join()); print(typeof(i) + ' ' + typeof(i-0));
4
by: pierre.bru | last post by:
hello, I have a page made of a frameset that contains 2 frames. if in that page I insert a new function in Document.prototype, will this function be available in the already loaded frames ? if...
3
by: Olov Johansson | last post by:
Hi, I'm looking for documentation on the __defineProperty__ SpiderMonkey extension. Olov Johansson
9
by: Phrogz | last post by:
I'm trying to write an 'each' function for a JavaScript array that behaves like Ruby's Array#each. (It doesn't matter if you know Ruby to help with this question.) My problem is the scope of...
3
by: Mehmet Yavuz S. Soyturk | last post by:
Hello, consider the next code: var obj = {}; with(obj) { var x = 10; } print(x); print(obj.x);
2
by: zowtar | last post by:
Guys, I am using slackware... js-spidermonkey 1.5 compiled - OK, Pyrex installed, but python-spidermonkey don't build... Screenshot: http://img406.imageshack.us/img406/562/testebp5.png what is...
3
by: majna | last post by:
I have character counter for textarea wich counting the characters. Special character needs same place as two normal characters because of 16-bit encoding. Counter is counting -2 when special...
1
by: Conrad Lender | last post by:
I was struggling with the stand-alone SpiderMonkey interpreter , trying to get it to do things it apparently wasn't designed for. Then somebody recommended JSDB , which embeds SpiderMonkey, and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.