473,659 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unicode Woes & VB.NET

I have a VB.NET app that is made up of several fill-in-the-blank-type
forms that allows non-technical people convert articles, press
releases and publications into XML.

For publications created in Adobe PageMaker, and a lot of the data
entered is just cut from PageMaker and pasted into my app.

My problem is that PageMaker uses em-dashes, typographer's quotes (the
slanty quotes `` and ''), etc. and they remain as such when pasted
into my app.

I haven't had any problems converting ASCII char's to their XML
equivalents (using the Replace() function), but I haven't had much
luck with these extended chars.

I know VB.NET is unicode goodness, and I've looked up the unicode
values for the chars that need to be replaced, but I haven't had much
luck.

There are really two problems here.

The first is that the dashes, apostrophe's and typographer's quotes
appear normally when you paste them into my RichTextBox, but they
don't seem to make it back out.

The other problem is that I can't even get the dang things to print in
a message box. The following code just prints the empty box that
appears when Windows doesn't know what character to render.

Dim myChar As Char
myChar = ChrW(&H2036) 'Typographer's Open Quote
MsgBox("Charact er:" & myChar, MsgBoxStyle.Exc lamation, "Char Result")

Someone suggested that I need to install the right language pack. If
these characters are not supported in my existing language/font packs,
why am I able to see them in my RichTextBox?

Can someone throw me a bone here? I've only coded two other VB.NET
apps, and need some help.

Thanks in advance!
Nov 20 '05 #1
3 1626
Nevermind, I'm an idiot. This program is a project I've been working
on in my spare time for the last two years. For some reason this
problem has stumped me until now. I did some reading up on
System.Text.Enc oding and I brushed up on ANSI, ASCII, UTF-n, etc. and
I was able to get this figured out. I was going in completely the
wrong direction.
no****@yakhair. com (Stilgar[bbs.isca.uiowa. edu]) wrote in message news:<4d******* *************** ***@posting.goo gle.com>...
I have a VB.NET app that is made up of several fill-in-the-blank-type
forms that allows non-technical people convert articles, press
releases and publications into XML.

For publications created in Adobe PageMaker, and a lot of the data
entered is just cut from PageMaker and pasted into my app.

My problem is that PageMaker uses em-dashes, typographer's quotes (the
slanty quotes `` and ''), etc. and they remain as such when pasted
into my app.

I haven't had any problems converting ASCII char's to their XML
equivalents (using the Replace() function), but I haven't had much
luck with these extended chars.

I know VB.NET is unicode goodness, and I've looked up the unicode
values for the chars that need to be replaced, but I haven't had much
luck.

There are really two problems here.

The first is that the dashes, apostrophe's and typographer's quotes
appear normally when you paste them into my RichTextBox, but they
don't seem to make it back out.

The other problem is that I can't even get the dang things to print in
a message box. The following code just prints the empty box that
appears when Windows doesn't know what character to render.

Dim myChar As Char
myChar = ChrW(&H2036) 'Typographer's Open Quote
MsgBox("Charact er:" & myChar, MsgBoxStyle.Exc lamation, "Char Result")

Someone suggested that I need to install the right language pack. If
these characters are not supported in my existing language/font packs,
why am I able to see them in my RichTextBox?

Can someone throw me a bone here? I've only coded two other VB.NET
apps, and need some help.

Thanks in advance!

Nov 20 '05 #2
Nevermind. I figured out my problem. I was going in completely the
wrong direction. I did some brushing up on ANSI, ASCII, and UTF-8/16,
plus some reading up on System.Text.Enc oding and I was able to figure
out my problem.

It's one of those things that you go berzerk trying to figure out
what's going on and then you discover you are the problem.
Nov 20 '05 #3
Nevermind. I figured out my problem. I was going in completely the
wrong direction. I did some brushing up on ANSI, ASCII, and UTF-8/16,
plus some reading up on System.Text.Enc oding and I was able to figure
out my problem.

It's one of those things that you go berzerk trying to figure out
what's going on and then you discover you are the problem.

no****@yakhair. com (Stilgar[bbs.isca.uiowa. edu]) wrote in message news:<4d******* *************** ***@posting.goo gle.com>...
I have a VB.NET app that is made up of several fill-in-the-blank-type
forms that allows non-technical people convert articles, press
releases and publications into XML.

For publications created in Adobe PageMaker, and a lot of the data
entered is just cut from PageMaker and pasted into my app.

My problem is that PageMaker uses em-dashes, typographer's quotes (the
slanty quotes `` and ''), etc. and they remain as such when pasted
into my app.

I haven't had any problems converting ASCII char's to their XML
equivalents (using the Replace() function), but I haven't had much
luck with these extended chars.

I know VB.NET is unicode goodness, and I've looked up the unicode
values for the chars that need to be replaced, but I haven't had much
luck.

There are really two problems here.

The first is that the dashes, apostrophe's and typographer's quotes
appear normally when you paste them into my RichTextBox, but they
don't seem to make it back out.

The other problem is that I can't even get the dang things to print in
a message box. The following code just prints the empty box that
appears when Windows doesn't know what character to render.

Dim myChar As Char
myChar = ChrW(&H2036) 'Typographer's Open Quote
MsgBox("Charact er:" & myChar, MsgBoxStyle.Exc lamation, "Char Result")

Someone suggested that I need to install the right language pack. If
these characters are not supported in my existing language/font packs,
why am I able to see them in my RichTextBox?

Can someone throw me a bone here? I've only coded two other VB.NET
apps, and need some help.

Thanks in advance!

Nov 20 '05 #4

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

Similar topics

5
6482
by: Edward K. Ream | last post by:
Am I reading pep 277 correctly? On Windows NT/XP, should filenames always be converted to Unicode using the mbcs encoding? For example, myFile = unicode(__file__, "mbcs", "strict") This seems to work, and I'm wondering whether there are any other details to consider. My experiments with Idle for Python 2.2 indicate that os.path.join doesn't work as I expect when one of the args is a Unicode string. Everything
27
5139
by: EU citizen | last post by:
Do web pages have to be created in unicode in order to use UTF-8 encoding? If so, can anyone name a free application which I can use under Windows 98 to create web pages?
3
7764
by: hunterb | last post by:
I have a file which has no BOM and contains mostly single byte chars. There are numerous double byte chars (Japanese) which appear throughout. I need to take the resulting Unicode and store it in a DB and display it onscreen. No matter which way I open the file, convert it to Unicode/leave it as is or what ever, I see all single bytes ok, but double bytes become 2 seperate single bytes. Surely there is an easy way to convert these mixed...
4
6059
by: webdev | last post by:
lo all, some of the questions i'll ask below have most certainly been discussed already, i just hope someone's kind enough to answer them again to help me out.. so i started a python 2.3 script that grabs some web pages from the web, regex parse the data and stores it localy to xml file for further use.. at first i had no problem using python minidom and everything concerning
1
1343
by: André | last post by:
I'm attempting to override a wxHtmlWindow method in order to pre-process the file before displaying it. I'm using a unicode version of wxPython. I don't think my problem are wxPython-specific, but rather a unicode mis-understanding. Consider the following: .. def OnLinkClicked(self, linkinfo): .. #adapted from the wxPython demo .. target_file = linkinfo.GetHref() .. current = self.GetOpenedPage() .. ...
7
4197
by: Robert | last post by:
Hello, I'm using Pythonwin and py2.3 (py2.4). I did not come clear with this: I want to use win32-fuctions like win32ui.MessageBox, listctrl.InsertItem ..... to get unicode strings on the screen - best results according to the platform/language settings (mainly XP Home, W2K, ...). Also unicode strings should be displayed as nice as possible at the console with normal print-s to stdout (on varying platforms, different
3
2146
by: KvS | last post by:
Hi all, I've been reading about unicode in general and using it in Python in particular lately as this turns out to be not so straightforward actually. I wanted to aks two questions: 1) I'm writing a program that interacts with the user through wxPython (unicode build) and stores & retrieves data using PySQLite. As fas as I know now, both packages are capable of handling Python unicode objects (wxPython returns the values of text...
4
8522
by: Tom Fields | last post by:
Hello! I like to use the XmlTextWriter to write some SVG files. But in some cases, I need the '&' as '&' and not as &amp;. Example: <glyph unicode="&#x4c;"/> Some code-snippet:
3
8115
by: RoxxorzIt | last post by:
Alright, all I'm trying to do at the moment is display who posted a topic from a page entirely separate from PHPBB. The problem is, it seems no matter what I do, I just can't find a way to do so. Then, I heard about the get_username_string() function. Well, it won't work for me and I don't even know why... First of all, I have no idea what parameters need to be passed to it aside from the user_id of the account in question. Here's what...
0
8332
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
8851
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
7356
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...
1
6179
isladogs
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
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
4175
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...
1
2750
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
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
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.