Search / replace words with accents

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
hayworth
Posts: 3
Joined: Sun Oct 07, 2012 9:44 am
Location: España

Search / replace words with accents

Post by hayworth »

Is it possible in Textpad search / replace words with accents?

I have in Preferences of Textpad:
Configure/Preferences/Document Classes
for all the Document Classes: UTF-8 in 2 places: Write BOM and Default Encoding

When a look for
<span class="smcap">Beristáin</span>
with search:
<span class="smcap">\([^<]*\)</span>
replace:
<span class="smcap">\U\1</span>

I got:
<span class="smcap">BERISTáIN</span> ("á" don't change)

I tried with other combinations like:
search:
<span class="smcap">\([^<]*[a-zA-Z áéíóú�É�ÓÚÑñÜü]+\)</span>
replace:
<span class="smcap">\U\1</span>

but not success.

Any ideas? Thank you.
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Unfortunately, although TextPad itself knows that the uppercase versions of á, é, í, ó, ú are �, É, �, Ó, Ú, its tired old search engine (in both literal and regex mode) doesn't. If, for example, you search for á it won't find �, and vice versa, regardless of whether you've selected Match case. And if, using Search | Replace you ask it to replace á with its uppercase version it will leave it as it is. There's nothing you can do about this.
Post Reply