Change charaterset of textbox winforms

G

Guest

Hi

Is there anyway to change the characterset/codepage of a specific textbox on
a winform.

I have read in a "chinese traditional big5" file into memory using a
streamreader with the appropriate codepage
SR = New StreamReader(TBLFilename,
System.Text.Encoding.GetEncoding(Cube.CodePage))

do I need to change the codepage of the entire form?
 
H

Herfried K. Wagner [MVP]

Richard Bond said:
Is there anyway to change the characterset/codepage of a specific textbox
on
a winform.

I have read in a "chinese traditional big5" file into memory using a
streamreader with the appropriate codepage
SR = New StreamReader(TBLFilename,
System.Text.Encoding.GetEncoding(Cube.CodePage))

do I need to change the codepage of the entire form?

..NET Windows Forms controls should be Unicode-aware. Did you try to use a
font that contains the required Unicode characters?
 
R

Richard Bond

Herfried,

If the textbox has to support all sorts of characters do I have to specify a
font for each language. In which case, how do I choose a font for each
language, and how should I distribute them best (Include each .ttf file and
set it to vsdrpFont in the setup project)?

or specify a font that is "font independent" somehow????

On a seperate note:

I have previously "got away with" changing the response.codepage and
response.charset "properties" on an ASP page to display chinese characters
without having to change the stylesheet from the Arial font. Was this a bit
of luck due to Font Fallback or something different?

Thank you for all your help,

Richard
 
H

Herfried K. Wagner [MVP]

Richard Bond said:
If the textbox has to support all sorts of characters do I have to specify
a
font for each language. In which case, how do I choose a font for each
language, and how should I distribute them best (Include each .ttf file
and
set it to vsdrpFont in the setup project)?

I didn't work much with localization, but I assume that a Chinese Windows
version will include fonts that provide the characters used by your
application so you don't have to care too much about choosing the right
fonts if you are using "standard fonts". Arial Unicode is a font that
contains lots of Unicode characters, but I am not sure if a "localized"
version of this font is installed on Chinese computers.
 
R

Richard Bond

Thank You,

Arial Unicode MS seems to support my requirements for the moment. Is it
correct to say that it is a font that can represent ~52,000 glyphs and that
the font is global, i.e. no local versions of the font?

I have it as a result of an office 2000 install, but how do I deploy it via
vb.net to someone who doesn't have it? (is the filename: ARIALUNI.TTF) and
are there performance implications of using such a gigantic lookup scheme
(its~100 times larger than normal arial)? + are there licensing
implications?

sorry for the hassle,

Richard
 
P

Peter Huang [MSFT]

Hi

The unicode encoding is global, so the font is global, i.e. they are same
on the different machine. While I think to localization a world-ready
program, we need to provide is the customized UI element, e.g. such as
strings, error messages, dialog boxes, menus, and embedded object
resources. But the font should be installed before, usually we did not
deploy the font with the deployment project.

Worldwide Deployment
http://office.microsoft.com/en-us/assistance/HA011363931033.aspx

Also for license issue, I highly recommend that you call 800-426-9400
(select option 4), Monday through Friday, 6:00 A.M. to 6:00 P.M. to speak
directly to a Microsoft licensing specialist.

Best regards,

Perter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
R

Richard Bond

Hmmm,

I'm getting more and more confused. This a reply to a similar question from
Dr International...... It seems more complicated than using Arial Unicode
MS, so unlesss anyone complains about the app I'll stick to Arial Unicode
MS.

Richard,

The best practice is to always use the higher-level font face name known as
"MS Shell Dlg." MS Shell Dlg is actually not a font. Rather, it is a font
face name that gets mapped to the right font depending on the
font-substitution settings of the operating system. By setting your default
resource font as MS Shell Dlg, you are assured of providing the appropriate
font solution, not only on Windows 2000 and Windows XP, but also on all
versions of Windows since Windows 95!

Hope this helps.
Dr. International
Windows International, Microsoft
Are you world-ready? -- http://www.microsoft.com/globaldev
 
P

Peter Huang [MSFT]

Hi Richard,

As the document said, the MS Shell Dlg is not a true font, it is a kind of
abstract font, it will be mapping into the really font according to the
locale setting in the system.
For detailed information, you may take a look at the "MS Shell Dlg" in the
msdn.

That is to say, if you wants to display certain font, you still need to
install the true font on the end-users' machine.
So my suggestion is to install the font with the windows or office
installation program. That is to say, you can write a readme to tell the
end-user to install the font. If you do wants to deploy the font, you can
also do that in the deployment project.

For license issue about deploy the font shipped with office , I highly
recommend that you call 800-426-9400
(select option 4), Monday through Friday, 6:00 A.M. to 6:00 P.M. to speak
directly to a Microsoft licensing specialist.

Best regards,

Perter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top