473,788 Members | 2,706 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

foreign letters in alert ()

Is there a way to have non-English letters and symbols, such as the
Greek letters or copyright sign, to appear in the box of alert()? Or is
the alert () also available to people with other writing systems? I
tried with such as δ. It didn't display.

This question is also for the prompt ().

Thanks.

Aug 23 '05 #1
3 2608
Ivo
"dalei" wrote
Is there a way to have non-English letters and symbols, such as the
Greek letters or copyright sign, to appear in the box of alert()? Or is
the alert () also available to people with other writing systems? I
tried with such as δ. It didn't display.

This question is also for the prompt ().


HTML escapes won't work. Unicode works better, but also not for all symbols.

window.alert( '\u00a9 is the copyright symbol.' ) )

hth
ivo
Aug 23 '05 #2
ASM
dalei wrote:
Is there a way to have non-English letters and symbols, such as the
Greek letters or copyright sign, to appear in the box of alert()? Or is
the alert () also available to people with other writing systems? I
tried with such as δ. It didn't display.

This question is also for the prompt ().

Thanks.


alert('hello from St\xe8phane');

JS use UTF-16 encodding
In my example Hexa is used ( kind of UTF-8)

to insert a 'ê' (HTML entity : ê) in a JS string
you can write :
\xea \xEA \xea or \u00ea

You can go here (french page, but a carateres table stay a table)
http://www.miakinen.net/vrac/charsets
while overing a caractere,
in a separate block, are displayed correspondances
example : ß (beta)
- Unicode : U+00DF -> alert('f = \x00dfx');
- Hexa : DF -> alert('f = \xdfx');

© copyright : \a9 or \x00a9
2 square : alert('4\xb2 = 4 x 4 = 16'); -> \xb2 or \x00b2

alert('\xbf se habla espa\xf1ol ?');
--
Stephane Moriaux et son [moins] vieux Mac
Aug 23 '05 #3
Thank all for help. After testing successfully the \xb2 and \xoob2 for
superscript 2, I tried \xb1, \xb2 \xb3 and \xb4 for superscripts 1 to
4. But only 2 and 3 display as expected. 1 and 4 are other symbols.
Could anyone teach me how to get superscripts 1 and 4?

I wish this thread has not been pushed too far from head of this forum.
Thanks again in advance.

Aug 24 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
8213
by: Toffe | last post by:
Hi, I've got a problem with regular expressions and strings containing Swedish characters (åäö). I basically have a PHP script that highlights certain words in a text. I found the code attached below in the commented manual at php.net. It works great for all words that do not contain Swedish characters. The words that do contain åäö will not be highlighted.
4
10772
by: Carlos Marangon | last post by:
Hello! People go to sign my guestbook and wrote all text in capital letters. Did you know any script that shows an window alert when one types the second capital letter? Best regards,
12
11449
by: Smash | last post by:
i have this function: ------------------------------------------------------------ function isAlfaNumeric(vnos,space) { if (space==false) { validRegExp = /^{0,}$/; } else { validRegExp = /^{0,}$/; }
1
1954
by: dalei | last post by:
I like to make foreign letters to appear in the textarea. For instance, when typing the letter 'a' on the keyboard, the Japanese letter &#+12449; would appear in the textarea. Could somebody insert a simple code in following program? I will follow suit from there. <style> body { font-family:arial;} textarea { font-family:"lucida sans unicode"; }
1
3105
by: James E | last post by:
I have a question about best practices of how to deal with lookup data from my C# apps. On a couple of occasions I have come across a problem where I have to automate inserting a record into a table that has a foreign key constraint that is linked to a lookup table. E.g. Take the following database structure: SQL-Server Database: Table 1:
0
1091
by: Daylor | last post by:
hi. i use the function the ms publish,to convert Managed String to Char * . with english string it works ok. now, i have problem, when for example ,im try to convert a path to file , when the file name is in HEBREW letters. the result i get it the conversion till the foreign fonts.
6
1202
by: Jerome | last post by:
Hi, I've made an input page in asp.net and the records are saved BUT without the 'foreign letters' like é, ä, ü and so on!? What could be the problem? My SQL database accepts these letters without problems, so it has to be asp.net who deletes them while inserting the record into the SQL database. The field in the database is defined as varchar(250).
1
1212
by: Trond Engebråten | last post by:
The typical foreign letters in the text file I read are missing. Has it something to do with the declaration of the file? Dim sr As StreamReader = File.OpenText("c:\MyFile.txt")
5
1985
by: yoshimishu | last post by:
i have to create two text boxes. If i fill in first text box the second textbox shoud automatically display the number of letters displayed in first text box. If the number of letters in first text box reaches 10 then an alert shoud show up saying too long. and both the text boxes shoul be reset. <html> <head> <Script language="JavaScript"> function alll() { if(document.forms.elements.value.length < 10) { ...
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10113
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9969
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8995
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5402
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2896
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.