With DBCS you have to take into account
– the number of characters
– the number of bytes (by which a character is represented)
– the rendering by the editor (proportional or non-proportional font)
As your are not very specific about our problem (“output file somehow not aligned”), it’s hard to give an advice.
If you open a “DBCS” file with Notepad++, you will notice that columns may be not aligned, but if you have a look at the “column indicator” you will see that the number of characters is correct.