Use monotype font. E.g.
Courier New in Windows or
Liberation Mono in Linux.
On the second thought:
First line is contained tabulator.
You mean that the first line contains a tab symbol, and the second - a few spaces, right? Hardly you can count on "tab width" being equal in different situations (e.g. you can choose your custom tab width in OpenOffice Writer which can be a non-integer ratio to a space width).
You may do a "tab to spaces" conversion (as IDE does). Or avoid using #9 symbol at all unless you're writing to a file in case you need setting exact screen width of strings. Or, of course, you can try figuring out how tab will render in each situation and for each different font, but I don't think it's worth it.