G'day derion,
My first guess is that if /behälter/i is causing problems, but /beh\xE4lter/i is not, then using the utf8 pragma might be all you need.
Having said that, you've only provided code fragments. Parts that you've omitted may be important, e.g. how you call the open function. Please provide an SSCCE that we can run: you should keep this as short as possible while still showing the problem; also, please provide a short input file (probably only needs to be a few lines long).
The error you show, "Incorrect string value: '\xE4", contains an unexpected apostrophe: perhaps the actual error message, a typo, an SQL problem, or something else. Please paste verbatim program output within <code>...</code> tags, rather than typing by hand.
I generally prefer "\x{NN}" to "\xNN", as it removes any possible ambiguity (especially if NN is followed by other digits). I don't see a problem with that here, but it could be elsewhere: a little defensive programming never hurts.
And just a heads-up, "U+00E4 LATIN SMALL LETTER A WITH DIAERESIS" (ä) canonically decomposes into U+0061 (a) and U+0308 (¨). Again, I don't see that as an issue here, but maybe worth knowing about. See PDF "Unicode Code Chart: 0080 - 00ff".
— Ken
In reply to Re: Perl encoding problem
by kcott
in thread Perl encoding problem
by derion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |