First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
2

Can PSSE have UTF-8 encoded bus names?

asked Oct 1 '13

Garth gravatar image

Does anyone use non-ascii encoded bus names in their PSS/E Saved cases?

e.g.

tillstånd

I am getting some UnicodeDecodeErrors - it might be a cause. Would love to hear if anyone else has gotten it working for them.

1 answer

Sort by » oldest newest most voted
1

answered Oct 20 '13

JervisW gravatar image

The answer is you can have non-ascii characters in PSSE. They are stored in latin1 format inside PSSE.

So if you are reading from a PSSE bus you can get the string for display like this:

ierr, busname  = psspy.notona(200)
busname = busname.decode('latin1')

Now your code will correctly handle languages from all around the world!

link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

Stats

Asked: Oct 1 '13

Seen: 584 times

Last updated: Oct 19 '13