Tabs in output file written by xelatex and pdflatex are different

I'm trying out pgfplots with `gnuplot` to generate the data. This works by having pgfplots write some stuff to an external file, run gnuplot on the file, and then use the generated data to plot the graph.

The problem I'm having is that I get different behaviour under `xelatex` as `pdflatex` or `lualatex`. In `xelatex`, the data file is littered with `^^I` whereas in the other two formats these are tabs. It appears that the code `^^I` is getting stored as a macro which then gets written out to the file, so possibly there's something funny going on with the `^^I` syntax: `xelatex` is reading it literally. Indeed, when I do `\show\pgfplots@TAB` (the macro in question) then for `pdflatex` and `lualatex` then I get a literal tab whereas for `xelatex` I get `^^I`.

So how do I get a tab in `xelatex`? And why isn't `\gdef\pgfplots@TAB{^^I}` working?

(The previous line in the code, by the way, is `\catcode`\^^I=12` - I don't know if that has anything to do with it.)

-

In TeX Live, the formats for pdf(la)tex and lua(la)tex are built loading the tcx translation file `cp227.tcx` that makes `^^I` "printable". This means that a category code 12 `^^I` is written out as a real tab character.
The `-8bit` option certainly makes it work. I'll keep an eye out for side effects. Thanks! –  Loop Space Apr 2 '11 at 17:41
@ChristianFeuersänger How about a "Known limitations" section in the manual? Also you could test for `xelatex` and print a warning "You're using xelatex. If things don't appear how you expect, try running with the -8bit option." –  Loop Space Apr 17 '12 at 19:33