
unicode and ANSI string manipulation repost
I extract a string from Access database and display it on a cell.
I have to insert a "<BR>" in a string to tailor its length for displaying.
For ANSI string, it was successful.
But for unicode, it was not. When i insert a <BR> in the string, it become
?BR> and displaying on the screen, instead of a new line.
any solution?
The following is the code:
'This function insert a return tag after a number of delimiter
'The delimiter is usually a space character
'tag: "<BR>"
'delimiter: " "
'l: length of text line defined(e.g 140 each line)
Function insertTag(str, tag, delimiter, l)
strToPut = ""
While (Len(str) > l)
head = Left(str, l)
pos = InStrRev(head, " ")
if (pos = 0) then
pos = l + 1
End if
text = Left(head, pos-1)
strToPut = strToPut & text & tag
str = Right(str, Len(str) - pos)
WEnd
strToPut = strToPut & str
insertTag = strToPut
End Function
someone suggest me to use the replace function:
memofield = rs("memofield")
memofield = replace(memofield,vbCrLf,"?<br>")
What is vbCrLf? and where can i find the reference for this kind of special
character?
do the replace function work with unicode characters?
thank u very much. Sorry for cross-post, but for some newsgroup, many
people
post question and buried mine.
By the way, I need some reference for Access 2000. any good note/web site
suggest?