473,406 Members | 2,713 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,406 software developers and data experts.

probleum in searching special character in vb

198 100+
hi
i have programe in which works fine for seaching the data from a file
but when the i want to seach the word like" mögen ". In this word " ö " has some other kind of shap and my programe did not searh it
please tell me how i will remove this probleum

varinder
Apr 24 '08 #1
4 1457
kadghar
1,295 Expert 1GB
hi
i have programe in which works fine for seaching the data from a file
but when the i want to seach the word like" mögen ". In this word " ö " has some other kind of shap and my programe did not searh it
please tell me how i will remove this probleum

varinder
Well here it really depends on the version of visual basic you're using.

Anyway, in every version, when you open the file, if it's some kind of text file, you'll be able to chose the enconding you'll use to open it: ASCII, UNICODE, UTF8, UTF9, BigEndianUnicode, etc.

Perhaps using UTF7 or UTF8, or somekind of the file's default, this problem would be solved

HTH
Apr 24 '08 #2
veer
198 100+
Hi
thanks for reply
but i am not understanding , but you are saying
can you give some code example so that i can search these words

thanks in advance
varinder

Well here it really depends on the version of visual basic you're using.

Anyway, in every version, when you open the file, if it's some kind of text file, you'll be able to chose the enconding you'll use to open it: ASCII, UNICODE, UTF8, UTF9, BigEndianUnicode, etc.

Perhaps using UTF7 or UTF8, or somekind of the file's default, this problem would be solved

HTH
Apr 25 '08 #3
VijaySofist
107 100+
hi
i have programe in which works fine for seaching the data from a file
but when the i want to seach the word like" mögen ". In this word " ö " has some other kind of shap and my programe did not searh it
please tell me how i will remove this probleum

varinder
Hi Varinder!

Just select this " ö " character from the HTMl File, copy it and paste it in your coding where you are trying to find this letter. It will look like a normal o But in the working process you will find success.

All the Best

With Regards
Vijay. R
Apr 25 '08 #4
kadghar
1,295 Expert 1GB
Hi
thanks for reply
but i am not understanding , but you are saying
can you give some code example so that i can search these words

thanks in advance
varinder
The encoding is some kind of 'List of characters', in VB Express Edition 2005 there's an example that shows you how to open a text file with different encondings.

That's useful while working with spanish, for example, because the ASCII or the UNICODE encoding wont support "camión" or "niño". That's why i use 'Default' or UTF7 (or 8)

About what Vijay says, well, thats true, you can search any character in a string, if you want to search an special character, it's quite simple to paste it in your code or in a textbox (this will allow you to see it as it is), and then search it.

The problem here is when you import a Text File that says Óscar (my name in spanish), It'll be stored in the string as ?scar, so even if you're able to search the 'Ó' character, it wont be in the string you imported from the text file.

If you want an example, well, importing text files is a syntax that has changed a lot, but in most of the recent versions, this might be of help:

Expand|Select|Wrap|Line Numbers
  1. Public Shared Function ReadAllLines ( _
  2.     path As String, _
  3.     encoding As Encoding _
  4. ) As String()
To declare it, and then, while using, you can change the enconding.

HTH
Apr 25 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: ATH0 | last post by:
How to search for special character { } and how to count them.. I got field called text ( undefined length ) and in this field you must define "{" as start and "}" as end of some text line. If...
1
by: madnav | last post by:
Its just not happening .. just can't seem to make a search querry work for special character '&' in the forum search query. Any helps? Trying to figure out how PASSWORD field in forms works...
3
KevinADC
by: KevinADC | last post by:
Purpose The purpose of this article is to discuss the difference between characters inside a character class and outside a character class and some special characters inside a character class....
2
by: veer | last post by:
hello expert i made a website which opens in ie6 and works fine but when i open it in ie7 it creates probleum the probleum is that i have a footer in my webpage , it automatically moves in the...
2
by: veer | last post by:
Hi i made a programe in which i want to calculate the total time from a column but when i declare a variable having datatype is "date" then the default value in this variable is "12:00:00: and...
3
by: veer | last post by:
Hi i have some probleum in reading the data from .val extension file when i manually open the file in notepad and just click on file option -> save -> close the txt file and then read the data...
1
by: veer | last post by:
Hi i made program on searching and if a word is present in a file more than one time this program search it one time and exit the file but i want to show all the locations of the searched word in...
0
by: AAaron123 | last post by:
Been playing with asp:changepassword and have it looking OK except that I can't elininate or change the title at the top that says "Change Your Password". It's a repeat of my pages title. ...
1
by: veer | last post by:
hi i think it's a silly question but i am very confused about this actually i made program on spell check.This is done by creating object of msword and then with the help of this object i create...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
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...
0
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...
0
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,...

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.