letter be is inserted into numbers as digit group separator | Bytes (2024)

aa

when I ourput data from Access, numbers bigger than 999 are shown with
letter "B" inserted into the 4th position left to the coma. (in my w2k
regional settings I have the decimal dot separator set to "." and digit
group separater set to nothing. In Access the number are shown with "." as
decimal separator, but for some reason ASP used "," instead)
Say, 3000,00 is shown as 3B 000,00
Why and how do I sort this out?

Jan 26 '07

Subscribe Reply

19 letter be is inserted into numbers as digit group separator | Bytes (1) 3106 letter be is inserted into numbers as digit group separator | Bytes (2)

  • <
  • 1
  • 2

Baz

I don't think it's anything to do with the code, I think there's some kind
of number display format setting somewhere, but I don't know enough about
ASP to know what.

The fact that using the Format function "corrects" it proves that what you
are getting from the recordset is a number. Numbers don't contain "B"
characters (at least, decimal ones don't!), hence what you have is a display
problem, not a problem with the data.

"aa" <A@aa.comwrot e in message
news:OE******** ******@TK2MSFTN GP02.phx.gbl...

You think it has to do with the ASP code?
It pretty standard and does not seem to use anything which can relevant to
the problem, but might have to do with some settings on the computer, for

it

works OK on my XP-Home notebook, and the problems happen on w2k Pro SP4.
Anyway, the code creates a recordset object and then goes through it
building rows for an HTML table like this:

=============== =============== ==
set objRS=objCom.Ex ecute
dim html_string, c
do while not objRS.eof
c= objRS(2)
html_string=htm l_string&"<tr>< td>" & c & "</td></tr>"
objRS.movenext
loop
Response.write html_string
=============== =============== ==

This gets letter "B" inserted
If I change
c= objRS(2)
to
c= FormatNumber(ob jRS(2),2,,,0)
then it is OK
"Anthony Jones" <An*@yadayadaya da.comwrote in message
news:eb******** ******@TK2MSFTN GP04.phx.gbl...


"aa" <A@aa.comwrot e in message
news:Og******** ******@TK2MSFTN GP05.phx.gbl...
applying ASP function FormatNumber() with digit groups separation
disabled
sorted the problem out.
But I still curious where that "B" came from
>
We are going to need to see some code if we have any chance helping you.


Jan 28 '07 #11

aa

Numbers do not contain, say, spacers either, yet spacers might be incertad
as digit group separator
In my case it looks like "B" is inserted as such a separator. Or the System
is incerting something else but encoding presents it as B
"Baz" <ba**@REMOVEbca p.THEeuro1net.C APScomwrote in message
news:45******** *************** @news.zen.co.uk ...

I don't think it's anything to do with the code, I think there's some kind
of number display format setting somewhere, but I don't know enough about
ASP to know what.

The fact that using the Format function "corrects" it proves that what you
are getting from the recordset is a number. Numbers don't contain "B"
characters (at least, decimal ones don't!), hence what you have is a

display

problem, not a problem with the data.

"aa" <A@aa.comwrot e in message
news:OE******** ******@TK2MSFTN GP02.phx.gbl...

You think it has to do with the ASP code?
It pretty standard and does not seem to use anything which can relevant

to

the problem, but might have to do with some settings on the computer,

for

it
works OK on my XP-Home notebook, and the problems happen on w2k Pro SP4.
Anyway, the code creates a recordset object and then goes through it
building rows for an HTML table like this:

=============== =============== ==
set objRS=objCom.Ex ecute
dim html_string, c
do while not objRS.eof
c= objRS(2)
html_string=htm l_string&"<tr>< td>" & c & "</td></tr>"
objRS.movenext
loop
Response.write html_string
=============== =============== ==

This gets letter "B" inserted
If I change
c= objRS(2)
to
c= FormatNumber(ob jRS(2),2,,,0)
then it is OK
"Anthony Jones" <An*@yadayadaya da.comwrote in message
news:eb******** ******@TK2MSFTN GP04.phx.gbl...

>
"aa" <A@aa.comwrot e in message
news:Og******** ******@TK2MSFTN GP05.phx.gbl...
applying ASP function FormatNumber() with digit groups separation
disabled
sorted the problem out.
But I still curious where that "B" came from

>
We are going to need to see some code if we have any chance helping

you.

>
>


Jan 28 '07 #12

Baz

Numbers do NOT contain spaces or group separators, such things are a
function of display formatting, they are NOT part of numeric data. The
FormatNumber function operates on numbers, any input value which contained a
"B" would be a string, not a number, and would result in a type mismatch
error. Hence, the "B" is not in the data, it is being added by some display
formatting.

"aa" <A@aa.comwrot e in message
news:Ob******** *****@TK2MSFTNG P06.phx.gbl...

Numbers do not contain, say, spacers either, yet spacers might be incertad
as digit group separator
In my case it looks like "B" is inserted as such a separator. Or the

System

is incerting something else but encoding presents it as B
"Baz" <ba**@REMOVEbca p.THEeuro1net.C APScomwrote in message
news:45******** *************** @news.zen.co.uk ...
I don't think it's anything to do with the code, I think there's some

kind

of number display format setting somewhere, but I don't know enough

about

ASP to know what.

The fact that using the Format function "corrects" it proves that what

you

are getting from the recordset is a number. Numbers don't contain "B"
characters (at least, decimal ones don't!), hence what you have is a
display
problem, not a problem with the data.

"aa" <A@aa.comwrot e in message
news:OE******** ******@TK2MSFTN GP02.phx.gbl...

You think it has to do with the ASP code?
It pretty standard and does not seem to use anything which can

relevant

to
the problem, but might have to do with some settings on the computer,
for
it
works OK on my XP-Home notebook, and the problems happen on w2k Pro

SP4.

Anyway, the code creates a recordset object and then goes through it
building rows for an HTML table like this:
>
=============== =============== ==
set objRS=objCom.Ex ecute
dim html_string, c
do while not objRS.eof
c= objRS(2)
html_string=htm l_string&"<tr>< td>" & c & "</td></tr>"
objRS.movenext
loop
Response.write html_string
=============== =============== ==
>
This gets letter "B" inserted
If I change
c= objRS(2)
to
c= FormatNumber(ob jRS(2),2,,,0)
then it is OK
>
>
"Anthony Jones" <An*@yadayadaya da.comwrote in message
news:eb******** ******@TK2MSFTN GP04.phx.gbl...

"aa" <A@aa.comwrot e in message
news:Og******** ******@TK2MSFTN GP05.phx.gbl...
applying ASP function FormatNumber() with digit groups separation
disabled
sorted the problem out.
But I still curious where that "B" came from
>

We are going to need to see some code if we have any chance helping

you.

>
>



Jan 28 '07 #13

Anthony Jones

"aa" <A@aa.comwrot e in message
news:OE******** ******@TK2MSFTN GP02.phx.gbl...

You think it has to do with the ASP code?
It pretty standard and does not seem to use anything which can relevant to
the problem, but might have to do with some settings on the computer, for

it

works OK on my XP-Home notebook, and the problems happen on w2k Pro SP4.
Anyway, the code creates a recordset object and then goes through it
building rows for an HTML table like this:

=============== =============== ==
set objRS=objCom.Ex ecute
dim html_string, c
do while not objRS.eof
c= objRS(2)
html_string=htm l_string&"<tr>< td>" & c & "</td></tr>"
objRS.movenext
loop
Response.write html_string
=============== =============== ==

This gets letter "B" inserted
If I change
c= objRS(2)
to
c= FormatNumber(ob jRS(2),2,,,0)
then it is OK

This is simply a case of messed up regional settings. Instead of having a .
or a , for the thousands separator the (or actually a) regional setting for
it has B as the thousands seperator.

First check that this isn't the case in the control panel -regional
settings -numbers tab. However this isn't the only place that IIS may get
regional settings in fact it's unlikely. Regional settings are per user and
are stored in the user profile.

Typically the user accessing a web site does not have a profile on the
server (unless they've logged on interactively). Most often the user is the
anonymous user anyway.

In this case ASP get it's regional settings from the .DEFAULT user profile.
Hence you should use RegEdit and open the key:-

HKEY_USERS\.DEF AULT\Control Panel\Internati onal

In there is a value sThousand value. It seems likely to me that currently
this contains a B.

Things are made worse by the fact that ASP caches the regional settings and
will use them for the life time of the process. Hence even if other
requests may run under user accounts of user that do have a profile with
different regional settings these settings will be ignored.

Therefore you may find that .DEFAULT is ok but another user profile is wrong
and it's this profile that just happens to be the first used.

Anthony.

Jan 28 '07 #14

aa

Thanks, Anthony,

1. My control panel settings I addressed in my originmal message - there is
nothing criminal in them as you can see
2. HKEY_USERS\.DEF AULT\Control Panel\Internati onal
I do not know which parameter there is responsible in this case, but by the
name, there is one which might be relevant: sGrouping which is set to 3;0
Is this the one?
Regarding other profiles - this is my personal computer and nobody was
setting profiles in here. Neither did I for I even do not know how to do
this.
However, apart from DEFAULT there are two other entries under HKEY_USERS,
named S-1-5-21-1960408961-1417001333-725345543-500 and
S-1-5-21-1960408961-1417001333-725345543-500_Classes
They both have sGrouping set to 3;0

What is the verdict?

"Anthony Jones" <An*@yadayadaya da.comwrote in message
news:e1******** ******@TK2MSFTN GP03.phx.gbl...

>
"aa" <A@aa.comwrot e in message
news:OE******** ******@TK2MSFTN GP02.phx.gbl...
You think it has to do with the ASP code?
It pretty standard and does not seem to use anything which can relevant

to

the problem, but might have to do with some settings on the computer,

for

it
works OK on my XP-Home notebook, and the problems happen on w2k Pro SP4.
Anyway, the code creates a recordset object and then goes through it
building rows for an HTML table like this:

=============== =============== ==
set objRS=objCom.Ex ecute
dim html_string, c
do while not objRS.eof
c= objRS(2)
html_string=htm l_string&"<tr>< td>" & c & "</td></tr>"
objRS.movenext
loop
Response.write html_string
=============== =============== ==

This gets letter "B" inserted
If I change
c= objRS(2)
to
c= FormatNumber(ob jRS(2),2,,,0)
then it is OK


This is simply a case of messed up regional settings. Instead of having a

..

or a , for the thousands separator the (or actually a) regional setting

for

it has B as the thousands seperator.

First check that this isn't the case in the control panel -regional
settings -numbers tab. However this isn't the only place that IIS may

get

regional settings in fact it's unlikely. Regional settings are per user

and

are stored in the user profile.

Typically the user accessing a web site does not have a profile on the
server (unless they've logged on interactively). Most often the user is

the

anonymous user anyway.

In this case ASP get it's regional settings from the .DEFAULT user

profile.

Hence you should use RegEdit and open the key:-

HKEY_USERS\.DEF AULT\Control Panel\Internati onal

In there is a value sThousand value. It seems likely to me that currently
this contains a B.

Things are made worse by the fact that ASP caches the regional settings

and

will use them for the life time of the process. Hence even if other
requests may run under user accounts of user that do have a profile with
different regional settings these settings will be ignored.

Therefore you may find that .DEFAULT is ok but another user profile is

wrong

and it's this profile that just happens to be the first used.

Anthony.


Jan 28 '07 #15

Anthony Jones

"aa" <A@aa.comwrot e in message
news:el******** ******@TK2MSFTN GP04.phx.gbl...

Thanks, Anthony,

1. My control panel settings I addressed in my originmal message - there

is

nothing criminal in them as you can see
2. HKEY_USERS\.DEF AULT\Control Panel\Internati onal
I do not know which parameter there is responsible in this case, but by

the

name, there is one which might be relevant: sGrouping which is set to 3;0
Is this the one?
Regarding other profiles - this is my personal computer and nobody was
setting profiles in here. Neither did I for I even do not know how to do
this.
However, apart from DEFAULT there are two other entries under HKEY_USERS,
named S-1-5-21-1960408961-1417001333-725345543-500 and
S-1-5-21-1960408961-1417001333-725345543-500_Classes
They both have sGrouping set to 3;0

What is the verdict?

That's fine. What setting do you have for sThousand?

Jan 28 '07 #16

aa

below is a very interesting comment I received from Mihai Nita in NG dealing
with
i18:
+++++++++++++++ +++++++++++++++ +++++++++++++++ +++++++++++++
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">

Jan 29 '07 #17

aa

I have nothing for sThousand - just a blank space.
As you can see from my previous post, the problem was in wrong encodinmg of
my HTML page.
But they bit of the Registry you refered me to is interesting. Where can I
read about meanings of all the parameters there?

"Anthony Jones" <An*@yadayadaya da.comwrote in message
news:#d******** ******@TK2MSFTN GP03.phx.gbl...

That's fine. What setting do you have for sThousand?

Jan 29 '07 #18

Anthony Jones

"aa" <A@aa.comwrot e in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..

I have nothing for sThousand - just a blank space.
As you can see from my previous post, the problem was in wrong encodinmg

of

my HTML page.

I don't think that is true. I see nothing wrong with either examples of
your code.

But they bit of the Registry you refered me to is interesting. Where can I
read about meanings of all the parameters there?

sThousand simply specifies the character to use to separate groups of
thousands in formatting number. I'm not sure what would happen in nothing
is specified. These values are manipulated by the control panel regional
settings.

Try editing that registry value and placing a , or . in that value.

Also worth a look is this KB:-

http://support.microsoft.com/kb/306044

>
"Anthony Jones" <An*@yadayadaya da.comwrote in message
news:#d******** ******@TK2MSFTN GP03.phx.gbl...
That's fine. What setting do you have for sThousand?


Jan 29 '07 #19

Anthony Jones

"aa" <A@aa.comwrot e in message
news:eU******** ******@TK2MSFTN GP05.phx.gbl...

below is a very interesting comment I received from Mihai Nita in NG

dealing

with
i18:
+++++++++++++++ +++++++++++++++ +++++++++++++++ +++++++++++++
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.

Ah I see that's why your sThousand setting appears blank.

>
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">

In ASP I prefer Response.CharSe t = "UTF-8"

Jan 29 '07 #20

  • <
  • 1
  • 2

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

Similar topics

96 6262

Underscores in Python numbers

by: Gustav Hållberg |last post by:

I tried finding a discussion around adding the possibility to have optional underscores inside numbers in Python. This is a popular option available in several "competing" scripting langauges, that I would love to see in Python. Examples: 1_234_567 0xdead_beef 3.141_592

Python

7 6399

Formatting numbers

by: Christopher Robin |last post by:

Hi, I'm trying to find if a function exists that would format a large (> 1000) number with comma notation on a unix type system... I currently have X = 10000; printf("X = %d\n", X); which obviously only prints:

C / C++

7636

What is ONU?

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...

General

7849

Problem With Comparison Operator <=> in G++

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. ...

C / C++

8070

Maximizing Business Potential: The Nexus of Website Design and Digital Marketing

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...

Online Marketing

1 7603

The easy way to turn off automatic updates for Windows 10/11

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...

Windows Server

6194

AI Job Threat for Devs

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...

Career Advice

1 5461

Access Europe - Using VBA to create a class based on a table - Wed 1 May

by: isladogs |last post by:

The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...

Microsoft Access / VBA

3608

Trying to create a lan-to-lan vpn between two differents networks

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...

Networking - Hardware / Configuration

3590

Windows Forms - .Net 8.0

by: adsilva |last post by:

A Windows Forms form does not have the event Unload, like VB6. What one acts like?

Visual Basic .NET

1 2051

transfer the data from one system to another through ip address

by: 6302768590 |last post by:

Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

C# / C Sharp

letter be is inserted into numbers as digit group separator | Bytes (2024)

FAQs

How to do digit grouping in Excel? ›

In the Data Type Format dialog box, do one of the following:
  1. To add a digit grouping symbol to the number, select the Use a digit grouping symbol check box, under Other options.
  2. To remove a digit grouping symbol from the number, clear the Use a digit grouping symbol check box, under Other options.

What is an example of a number format? ›

An N-formatted number has an implied decimal point (for example, 2.01 formatted as N2 is 201). An R-formatted number has an explicit decimal point and truncates trailing zeros (for example, 2.123 formatted as R2 is 2.12 and 3.10 formatted as R2 is 3.1).

How to format a number as text in Excel? ›

Format numbers as text
  1. Select the cell or range of cells that contains the numbers that you want to format as text. How to select cells or a range. ...
  2. On the Home tab, in the Number group, click the arrow next to the Number Format box, and then click Text.

How to change number format in Excel formula? ›

Press CTRL + 1 and select Number. Right-click the cell or cell range, select Format Cells… , and select Number. Select the small arrow, dialog box launcher, and then select Number.

What is the digit grouping symbol? ›

Digit grouping. For ease of reading, numbers with many digits may be divided into groups using a delimiter, such as comma "," or dot ".", half-space (or thin space) " ", space " ", underscore "_" (as in maritime "21_450") or apostrophe «'».

How do you write numbers in letter format? ›

However, it's important to note that this rule varies between the Associated Press Stylebook and the Chicago Manual of Style. The AP Stylebook states that numbers between zero and nine should be spelled out, while the Chicago Manual of Style states that numbers between zero and one hundred should be spelled out.

What is the proper formatting for numbers? ›

Overview of number formatting

Numbers with two or more digits should be written as numerals unless they are at the start of a sentence (see examples). Numbers between 1000 and 9999 should contain no punctuation. Whole numbers with five or more digits should include commas (not decimal points or full stops).

What is the correct format for US numbers? ›

The standard US telephone number is a 10-digit number, such as (555) 555-1234, where the first three digits are the "area code".

Why won't Excel recognize numbers? ›

This can happen due to various reasons, such as using apostrophes, applying the Text format, or utilizing Text functions. To resolve this issue, you need to convert text-formatted values back to numbers.

How do I convert Excel to number format? ›

Here's how you can change the format to Number:
  1. Select the cells that have the data you want to reformat.
  2. Click Number Format > Number. Tip: You can tell a number is formatted as text if it's left-aligned in a cell.

How do you convert text to digits in Excel? ›

To convert cells that are formatted as text to numbers, follow these steps:
  1. Select the cell that is formatted as text that you want to convert to a number. ...
  2. On the Error Checking Options button, click the down arrow. ...
  3. Click Convert to Number.

How to convert letters to numbers in Excel? ›

Convert a column of text to numbers
  1. Select a column. Select a column with this problem. ...
  2. Select Text to Columns. The Text to Columns button is typically used for splitting a column, but it can also be used to convert a single column of text to numbers. ...
  3. Select Apply. ...
  4. Set the format.

What is text number format? ›

The TEXT function lets you change the way a number appears by applying formatting to it with format codes. It's useful in situations where you want to display numbers in a more readable format, or you want to combine numbers with text or symbols.

Why can't I change the number format in Excel? ›

Here are the steps:
  1. Select the column of dates that you want to convert.
  2. Go to the Data tab and click on Text to Columns.
  3. In the Convert Text to Columns Wizard, select Delimited and click Next.
  4. In the next screen, uncheck all the delimiter options and click Next.
Oct 26, 2023

How do I group numbers in Excel? ›

Select the data (including any summary rows or columns). Go to Data > Outline > Group > Group, and then select Rows or Columns.

How do I combine digits in Excel? ›

Combine data with the Ampersand symbol (&)
  1. Select the cell where you want to put the combined data.
  2. Type = and select the first cell you want to combine.
  3. Type & and use quotation marks with a space enclosed.
  4. Select the next cell you want to combine and press enter. An example formula might be =A2&" "&B2.

How do I format a group of numbers in Excel? ›

Select the cells that you want to format. On the Home tab, in the Number group, click the dialog box launcher next to Number (or just press CTRL+1). In the Category list, click the format that you want to use, and then adjust settings, if necessary.

How do I group decimal numbers in Excel? ›

Choose Analyze > Group > Group Selection

Within the group dialog box, there is a need to specify the start and the end point. By value needs to be entered as well which will help in creating groups having an interval that would be equivalent to the By value. Click on OK.

Top Articles
Latest Posts
Article information

Author: Arielle Torp

Last Updated:

Views: 5872

Rating: 4 / 5 (41 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Arielle Torp

Birthday: 1997-09-20

Address: 87313 Erdman Vista, North Dustinborough, WA 37563

Phone: +97216742823598

Job: Central Technology Officer

Hobby: Taekwondo, Macrame, Foreign language learning, Kite flying, Cooking, Skiing, Computer programming

Introduction: My name is Arielle Torp, I am a comfortable, kind, zealous, lovely, jolly, colorful, adventurous person who loves writing and wants to share my knowledge and understanding with you.