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 / New Users / November 2004

Tip: Looking for answers? Try searching our database.

System.Drawing.Graphics and escaped characters

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brett - 17 Nov 2004 16:38 GMT
I'm trying to print barcodes with a barcode font and I'm having problems with
escaped characters.  I can print and scan any barcode perfectly, until there
is an escaped character in it, like /" or //.  Then the barcode will not
scan.  I can put a breakpoint in, copy the data from the watchlist, remove
the /'s and print the barcode in word processor just fine.  I'm guessing that
Graphics.Drawstring(string) is somehow printing the '/' before the escaped
character.  Unless I am doing something wrong, this has to be a bug.  Any
suggestions or ideas?
Charlie Williams - 17 Nov 2004 18:41 GMT
The C# escape character is a backslash '\', not a forward slash '/'

> I'm trying to print barcodes with a barcode font and I'm having problems with
> escaped characters.  I can print and scan any barcode perfectly, until there
[quoted text clipped - 4 lines]
> character.  Unless I am doing something wrong, this has to be a bug.  Any
> suggestions or ideas?
Brett - 17 Nov 2004 19:15 GMT
Sorry, typo, double checked, I used \'s.

> The C# escape character is a backslash '\', not a forward slash '/'
>
[quoted text clipped - 6 lines]
> > character.  Unless I am doing something wrong, this has to be a bug.  Any
> > suggestions or ideas?
Charlie Williams - 17 Nov 2004 22:20 GMT
I'm sorry, then.  I don't know what the problem is, assuming you're using C#
(or at least not VB.NET, which doesn't use the '\' as an escape character),
the string in question is in the code file (i.e., not retrieved from a config
file or some other outside source - the '\'s wouldn't be escape characters in
that case), and the string is not marked as being literal (with an ampersand
'@').

> Sorry, typo, double checked, I used \'s.
>
[quoted text clipped - 8 lines]
> > > character.  Unless I am doing something wrong, this has to be a bug.  Any
> > > suggestions or ideas?

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.