Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Separating UTF-8 from Non UTF-8 Words

Status
Not open for further replies.

SpeedStick

Technical User
May 24, 2007
37
0
0
US
I need to identify characters/words that are UTF-8. I am just trying to either highlight a cell, a word or a letter that indicates it is UTF-8. I currently have the data stored in Microsoft Access and I will export it Microsoft Excel.

The ultimate goal would be to try to separate UTF-8 words from not UTF-8 words.

UTF-8 examples:
Höhenstraße 27
Drève Richelle, 161 BatG
Rue du Trône 108

Non-UTF-8 Examples:
Chemin du Foriest
300 avenue Provinciale

Any assistance would be great.
 
I do not think your question is correct since all values are encoded in unicode. I think you want to return all values not in the Basic Latin set. Untested without VBA
Code:
public function IsNotBasicLatin(strText as string) as boolean
  dim I as integer
  dim letter as string
  dim UnicodeValue as integer
  for I = 1 to Len(strText)
    letter = mid(strText,I,1)
    UnicodeValue = ASCW(letter)
    if UnicodeValue > 127 then
        IsNotBasicLatin = true
        exit for
    end if  
  next I
end function
 
So used in a query

select ... from some table where IsNotBasicLatin([yourfieldName]) = false
 
MajP

Thanks for the direction. I will copy your code and troubleshoot to see if I can make it work.

SpeedStick
 
OK. It is Just and idea, it is completely untested.
 
I understand. However, I will try to make it work. I know other individuals might have needed some type of solution to this problem. I was just trying to seee if anyone else had already solved it. I have tried several solutions and none have worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top