• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Merging strings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Merging strings?


  • Subject: Re: Merging strings?
  • From: Markus Hitter <email@hidden>
  • Date: Fri, 2 Sep 2005 11:57:16 +0200


Am 02.09.2005 um 08:43 schrieb Alexey Proskuryakov:

On 02.09.2005 10:15, "Markus Hitter" <email@hidden> wrote:

What I need is a tool that will open both .strings source files,
merge them, and keep the first instance of any duplicate strings.

Something like

cat source1.strings source2.strings | sort | uniq >result.strings

Will this work for UTF-16 (AFAIK, .strings are recommended to be such)?

A quick test (taking a random, Apple provided .strings file, converting it to UTF-16 in Xcode and sorting it at the CLI) worked. The resulting file remains to be UTF-16 encoded. The answer should be "yes".


If the OP's .strings file still contains Classic Mac (\r) line endings, he should convert them by adding a

    tr '\r' '\n' |

right before the "sort" command. There's still a chance it won't work for non-ASCII-similar text files (other line endings than /n: Japanese, Chinese, Hebrew, Cyrillic, ...); I'll leave it up to test this to those having such files handy.


Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/




_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Merging strings?
      • From: Alexey Proskuryakov <email@hidden>
References: 
 >Re: Merging strings? (From: Alexey Proskuryakov <email@hidden>)

  • Prev by Date: Build configurations and static libraries
  • Next by Date: Re: Merging strings?
  • Previous by thread: Re: Merging strings?
  • Next by thread: Re: Merging strings?
  • Index(es):
    • Date
    • Thread