gimp/build/windows/installer/lang/extractlang.sh
Jehan 3e1b783adb build: drop codepage conversion, use UTF-8 for Win install lang files.
Rewriting commit f8cdec1883 by Jernej Simončič for the development
code (which has a slightly different list of languages).

Also adding the meson version of this change.

Since now InnoSetup fully supports UTF-8 isl (as long as they have a
BOM), let's stop converting translations. Then we also avoid all
conversion errors and get a simpler/more robust build process.
2021-12-20 18:50:50 +01:00

11 lines
303 B
Bash

#!/bin/bash
prefix=$1
infile=$2
#replace [] with \[\]
prefix=$(echo "$prefix" | sed 's/[][]/\\\0/g')
# InnoSetup now supports UTF-8 for all languages, but it requires a BOM
# at the start of the file.
echo -ne "\\xEF\\xBB\\xBF";
sed '/^\w\+'"$prefix"'=/{s/\(.\)'"$prefix"'/\1/;n};/^\w.*=/d' "$infile"