strtran equivalent with utf8

115 views
Skip to first unread message

Jayadev U

unread,
Apr 21, 2026, 10:01:50 AM (3 days ago) Apr 21
to harbou...@googlegroups.com

Hi,

 

The function StrTran(<cString>, <cFindString>, [<cReplaceWith>)  gives an updated cNewString, Is there something which can be used with utf8.

 

I need to remove an accent character (ÿ) in a given string in multiple fields which have many occurrences within each field at different positions caused by some file conversion error.

 

Best,

 

Jayadev

 

Tony Quick

unread,
Apr 22, 2026, 10:23:37 AM (2 days ago) Apr 22
to Harbour Users
I'm not sure I understand the question.  Doesn't strtran already handle UTF8?  in hbrun, type:
? strtran("accent character (ÿ)accent character (ÿ)","ÿ","Y")
Output is:
accent character (Y)accent character (Y)

Regards,

Tony

Daniel Aisenberg

unread,
Apr 22, 2026, 11:59:03 AM (2 days ago) Apr 22
to harbou...@googlegroups.com
Make sure your original PRG file is encoded in UTF-8. You may need to retype hardcoded strings if they contain special characters.

--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/6179a10e-c8e9-4a07-8ffe-98543dac29b0n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages