473,747 Members | 2,762 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 2606
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
8212
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
10771
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
11444
by: Smash | last post by:
i have this function: ------------------------------------------------------------ function isAlfaNumeric(vnos,space) { if (space==false) { validRegExp = /^{0,}$/; } else { validRegExp = /^{0,}$/; }
1
1952
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
1088
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
1199
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
1209
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
1983
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
8979
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8818
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9522
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9354
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9307
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
6067
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
4588
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...
2
2771
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2203
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.