473,320 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

unprintable characters

MAF
Does anyone know how to add unpritable characters to a string?

string mystring = "";

// I want to add char190 to the string

mystring = "this is a test<char 190>"
Nov 16 '05 #1
3 4312
Hi MAF,

You can add the character via a Unicode escape:

"this is a test\u00BE"

Remember to convert the number to Hex. i.e. 190 = BE.

Joe
--
http://www.csharp-station.com

"MAF" <mf*****@henwoodenergy.com> wrote in message
news:uK**************@TK2MSFTNGP09.phx.gbl...
Does anyone know how to add unpritable characters to a string?

string mystring = "";

// I want to add char190 to the string

mystring = "this is a test<char 190>"

Nov 16 '05 #2
MAF
Is there a quick function like HEX(intVal)?
"Joe Mayo" <jm***@nospamAtCSharpDashStation.com> wrote in message
news:%2******************@TK2MSFTNGP14.phx.gbl...
Hi MAF,

You can add the character via a Unicode escape:

"this is a test\u00BE"

Remember to convert the number to Hex. i.e. 190 = BE.

Joe
--
http://www.csharp-station.com

"MAF" <mf*****@henwoodenergy.com> wrote in message
news:uK**************@TK2MSFTNGP09.phx.gbl...
Does anyone know how to add unpritable characters to a string?

string mystring = "";

// I want to add char190 to the string

mystring = "this is a test<char 190>"


Nov 16 '05 #3
This should work too:

"this is a test" + (char)190

Joe
--
http://www.csharp-station.com

"MAF" <mf*****@henwoodenergy.com> wrote in message
news:e9**************@TK2MSFTNGP12.phx.gbl...
Is there a quick function like HEX(intVal)?
"Joe Mayo" <jm***@nospamAtCSharpDashStation.com> wrote in message
news:%2******************@TK2MSFTNGP14.phx.gbl...
Hi MAF,

You can add the character via a Unicode escape:

"this is a test\u00BE"

Remember to convert the number to Hex. i.e. 190 = BE.

Joe
--
http://www.csharp-station.com

"MAF" <mf*****@henwoodenergy.com> wrote in message
news:uK**************@TK2MSFTNGP09.phx.gbl...
Does anyone know how to add unpritable characters to a string?

string mystring = "";

// I want to add char190 to the string

mystring = "this is a test<char 190>"



Nov 16 '05 #4

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

Similar topics

9
by: Andrew DeFaria | last post by:
I'm attempting to put my music collection on the web using PHP and I hit a problem. When I attempt an opendir of a directory that contains a "'" character the opendir fails. Here's the code...
19
by: MKoool | last post by:
I have a file with binary and ascii characters in it. I massage the data and convert it to a more readable format, however it still comes up with some binary characters mixed in. I'd like to...
0
by: Dave | last post by:
I thought I posted this question yesterday, but I'm not finding it today, so sorry if this is a repeat Is there a way, without resorting to SDK calls, to get the unprintable margin of a printer?...
6
by: Steve Bergman | last post by:
When sanitizing data coming in from HTML forms, I'm doing this (lifted from the Python Cookbook): from string import maketrans, translate, printable allchars = maketrans('','') delchars =...
1
by: rmgalante | last post by:
I have a Windows Service that reads and writes an XML file to disk periodically. I use the XmlSerializer to serialize and deserialize the XML file on disk. I am writing the file using an...
2
by: Jim Heavey | last post by:
Hello, I have an file that I am reading and it has some goffy characters in it and I want to use a regular expression to clean up those characters. I am not sure how to construct a regular...
5
by: chandanlinster | last post by:
consider the following program /****************************************************/ #include <stdio.h> #include <stdlib.h> int main(void) { int c;
0
by: Benny the Guard | last post by:
I have a string value that may contain some unprintable characters. I am using the xml.sax.escape to remove the the <, > and & characters fine but it seems to leave in the \n characters. Later this...
9
by: emrefan | last post by:
I am wondering a bit about what I should see in a message box (or in a webpage, for that matter) when I include an unprintable ASCII character, say ASCII 255, in there. I experimented a bit on my...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.