My program has an ini file which i read in the settings for the program.
The main setting is the path where files are to be saved. At the
moment it doesn't work, but if I hardcode the path it does (even though
the hardcoded path is the same as the one in the ini file).
I looked at the path in a text box after it had been read in and it had
a strange character on the end, it was a slim upright rectangle, i
assume this is the source of my problem. Anyone know how I can read in
the string without this character ?
Any help appreciated.
--
Eps http://ukcomment.blogspot.com/
A UK political Blog 4 1774
Eps,
In the debugger, I would check the length of the string, and find out
the value of that character. It is possible that there is some whitespace
or non printable character that is in the file.
In either case, you can trim off the whitespace or non printable
character, or modify the file (I'd cut it out and retype the path in the ini
file).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"Eps" <ep*@mailinator .com> wrote in message
news:d3******** **@domitilla.ai oe.org... My program has an ini file which i read in the settings for the program. The main setting is the path where files are to be saved. At the moment it doesn't work, but if I hardcode the path it does (even though the hardcoded path is the same as the one in the ini file).
I looked at the path in a text box after it had been read in and it had a strange character on the end, it was a slim upright rectangle, i assume this is the source of my problem. Anyone know how I can read in the string without this character ?
Any help appreciated.
-- Eps
http://ukcomment.blogspot.com/
A UK political Blog
Nicholas Paldino [.NET/C# MVP] wrote: Eps,
In the debugger, I would check the length of the string, and find out the value of that character.
I'm using visual c# 2005 express, how can i view the contents of a
varible when the program is running ?
--
Eps http://ukcomment.blogspot.com/
A UK political Blog
The cheap and nasty way is to do this:
Console.WriteLi ne("Character code is: {0}",
(int)problemStr ing[problemString.L ength - 1]);
this will print out the character code as an integer. You can then look
it up in an ASCII table.
Bruce Wood wrote: The cheap and nasty way is to do this:
Console.WriteLi ne("Character code is: {0}", (int)problemStr ing[problemString.L ength - 1]);
this will print out the character code as an integer. You can then look it up in an ASCII table.
thanks for everyones help, turns out using the Trim method sorted it.
--
Eps http://ukcomment.blogspot.com/
A UK political Blog This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Anders Eriksson |
last post by:
Hello!
I'm using ActivePython 2.3.2 build 232 on Windows 2000 and I have noticed a
strange behavior in PythonWin IDE (win32all build 163)
I'm from Sweden and we have a couple of letters in our alphabet that isn't
part of ASCII and the strangeness is about one of them
When I use the letter å (å) then the next character is eaten! Then
when I enter the next character (the second after å) the last one appears.
|
by: Tomasz Lisowski |
last post by:
Hi,
We are distributing our Python application as the short main script (.py
file) and a set of modules compiled to the .pyc files. So far, we have
always treated .pyc files as portable between platforms, but recently we
have discovered an annoying problem. In a module, there is the following
code fragment:
Deg2Rad = math.pi/180.0
angleEPS = 0.5
|
by: Sam Sungshik Kong |
last post by:
Hello!
I'm testing Graphics.DrawString and it's very strange.
I created an event handler for the form.s Paint event.
(There's no other code in the form.)
private void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
|
by: Tina |
last post by:
I'm using 1.1/vs.net 2003 ...
C#example..............
string myPath = Server.MapPath(".\\Data\\" + (string)
Session);
Produces this value in myPath
?myPath
|
by: blumen |
last post by:
Hi all,
I'm a newbie in VB.Net Programming..
Hope that some of you can help me to solve this..
I'm working out to read,parse and save textfile into SQL Server.
The textfile contains thousands of rows with about 50 coloums every row..
Everythings goes well until I found one textfile with some strange character...seems to be Japanese character(because it's a Japanese company who owns this textfile)
| |
by: Mark Morss |
last post by:
Is this the place to ask a win32com.client question? I am a unix
person trying to run on windows, so I have little familiarity with
this module. I have this code:
import win32com.client
"""An Access connection"""
def connect(data_source, user, pwd, mdw):
connAccess = win32com.client.Dispatch(r'ADODB.Connection')
|
by: ZuLuuuuuu |
last post by:
Hello, I have a strange problem or the problem is very obvious and I can't see it :) I'm kind of a new C programmer so the chance of the latter is more :)
Anyway, I have a structure like this:
#define EN_COK_HECE 40
struct kel
{
char kelime;
char sesliHarfler;
|
by: email7373388 |
last post by:
I'm working on a program which has a strange operator, :>. This is
the syntax:
((unsigned short)( var1)):>((void __near *)( var2 ))
Any clue?
|
by: ioni |
last post by:
Good day, fellows!
I have a strange problem – at my site there is a flash strip, that
loads data dynamically.
It works fine (grabs data from the remote server and presents it),
however in IE7 and its clones I encounter a strange problem where I
can hear clicking sound non-stop (like the page is being reloaded non-
stop), whereas the page is not reloading.
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
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...
|
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...
|
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
| |
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...
| |