Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 500427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:05:10+00:00 2026-05-13T06:05:10+00:00

How to make locale aware uppercase operation? Standard tr ‘[:lower:]’ ‘[:upper:]’ trick doesn’t work:

  • 0

How to make locale aware uppercase operation?

Standard tr ‘[:lower:]’ ‘[:upper:]’ trick doesn’t work:

=$ echo żółw | tr "[:lower:]" "[:upper:]"
żółW

(it should be ŻÓŁW)

I’d rather avoid having to run Perl or anything such heavy-weight.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:05:10+00:00Added an answer on May 13, 2026 at 6:05 am

    It seems to me that if you want to avoid a heavyweight you’d need to provide the characters yourself, and, given that’s a nonstarter for a truly generic solution, you are stuck with using a heavyweight.

    One heavyweight solution

    vinko@parrot:~$ more t.py
    # coding: UTF-8
    print unicode.upper("żółw".decode('utf-8'))
    vinko@parrot:~$ python t.py
    ŻÓŁW
    

    Non-heavyweight solution that would require you to specify each character

    vinko@parrot:~$ echo żół | tr "[żół]" "[ŻÓŁ]"
    ŻÓŁ
    

    EDIT: Based on the other answer and comments, BASH 4.0 IS locale sensitive and aware of wide chars. You have to set a proper locale of course (LC_CTYPE or LC_ALL) so BASH can tell what it is supposed to do. Also it seems that there are locale sensitive versions of tr as of late (for example, Mac OSX 10.6)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to make a local copy of a database in a .NET app
I use svn:externals to reference several open source projects. I then make some local
I use git checkout -b somebranch origin/somebranch to make sure my local branches track
I'm trying to make a time with Time.local which in my code is dynamic.
I can not locate the correct method to make the first item in a
It is very easy to make eclipse compare the current local state of the
I just went through trying to make an alarm clock app with local notifications
make /bin/sh /Users/myusername/Downloads/php-5.3.5/ext/mssql/libtool --mode=compile cc -I. -I/Users/myusername/Downloads/php-5.3.5/ext/mssql -DPHP_ATOM_INC -I/Users/myusername/Downloads/php-5.3.5/ext/mssql/include -I/Users/myusername/Downloads/php-5.3.5/ext/mssql/main -I/Users/myusername/Downloads/php-5.3.5/ext/mssql -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM
Make it on Linux. The reason to use more than one version of Vim,
I make a picture with phone (640*480) and put it inside uiimageview (300*300) with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.