Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Internationalization / January 2007

Tip: Looking for answers? Try searching our database.

formating number - any relation to i18?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
aa - 28 Jan 2007 16:25 GMT
w2k SP2.
chcp returns 866
Accsess-2000
A table stores numbers in currency format
When outputting thsese numbers into an HTML page using ASP and Personal Web
Server and viewing it in IE6 all the numbers greater than 999 (i.e. those
where digit group separator might be applied), have letter "B" inserted
together with a space as a group separator.  For instance, 3000.00  is shown
as 3B 000.00
In regional settings the digit group separater set to nothing (empty field)
In Accsess all the numbers look normal.

I managed to sort this out by explicitly disabling digit grouping using
built-in ASP function FormatNumber().
Yet I still am curious where this "B" cames from.
On another computer it works fine without FormatNumber(). Therefore the
problem seems to be somewhere in w2k settings.
Mihai N. - 28 Jan 2007 20:04 GMT
> w2k SP2.
> chcp returns 866
[quoted text clipped - 13 lines]
> On another computer it works fine without FormatNumber(). Therefore the
> problem seems to be somewhere in w2k settings.

This has little to do with number format.

Russian uses non breaking space (U+00A0) as thousand separator (an I guess
you are on Russian system because of the 866). This is the result of number
formatting, and it is correct.

Non-breaking space as UTF-8 is 'C2 A0' (bytes), which, when interpreted
as 1252, gives cyrillic capital letter Ve (U+0412) (which looks like an
uppercase B), followed by non-breakig space.

So you are seeing a UTF-8 page as 1251.
To confirm this is the case, force the browser to UTF-8:
  Firefox: View -> Character Encoding -> Unicode (UTF-8)
  IE6: View -> Encoding -> Unicode (UTF-8)

Is the result looks ok, try adding the proper meta tag in the head section of
your HTML:
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Signature

Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email

aa - 28 Jan 2007 21:31 GMT
Mihai, Many thanks for the most irrefragable answer
aa - 28 Jan 2007 21:31 GMT
Is it OK if I post your comment to a NG dealing with ASP - other people
might find it useful?
Mihai N. - 28 Jan 2007 22:24 GMT
> Is it OK if I post your comment to a NG dealing with ASP - other people
> might find it useful?
As long as you keep the author info, no problem :-)
Whatever I post in a public newsgroup/web site is public info,
you don't even need to ask :-)

Signature

Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.