Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lt-tmxproc doesn't keep escaped input chars escaped in output #190

Open
unhammer opened this issue Oct 29, 2024 · 1 comment
Open

lt-tmxproc doesn't keep escaped input chars escaped in output #190

unhammer opened this issue Oct 29, 2024 · 1 comment

Comments

@unhammer
Copy link
Member

$ echo "3 > 2"  | apertium -f txt -d . nob-nno
3 > 2

$ echo "1 > 2"  | apertium -f txt -d . -m word.tmx  -o nob-nno nob-nno
Error: Malformed input stream.

$ echo "how about 1 < 2 then?"  | apertium -f txt -d . -m word.tmx  -o nob-nno nob-nno
*how *about 1

# possible workarounds:
$ echo "1 < 2"  | apertium -f html -d . -m word.tmx  -o nob-nno nob-nno
1 &lt; 2

$ echo "1 < 2"  | apertium -f html-noent -d . -m word.tmx  -o nob-nno nob-nno
1 &lt; 2

$ echo "1 < 2"  | apertium -f html-alt -d . -m word.tmx  -o nob-nno nob-nno
1 < 2

word.tmx is irrelevant:

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE tmx SYSTEM "tmx14.dtd">
<tmx version="1.4">
  <header creationtool="Translate Toolkit - po2tmx" creationtoolversion="1.9.0"
          segtype="sentence" o-tmf="UTF-8" adminlang="nob" srclang="nno" datatype="PlainText"/>
  <body>
    <tu>
      <tuv xml:lang="nob">
        <seg>foo</seg>
      </tuv>
      <tuv xml:lang="nno">
        <seg>bar</seg>
      </tuv>
    </tu>
  </body>
</tmx>
@unhammer
Copy link
Member Author

unhammer commented Nov 1, 2024


$ printf '1 \< 2.[][\n]'| ~/PREFIX/lttoolbox/bin/lt-tmxproc -s -z tiny.tmx.bin
1 < 2.[][
]

@unhammer unhammer transferred this issue from apertium/apertium Nov 1, 2024
@unhammer unhammer changed the title txt+tmx malformed input stream lt-tmxproc doesn't keep escaped input chars escaped in output Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant