IronLanguages / main

Work for this repo has moved to https://github.com/IronLanguages/ironpython2
1.16k stars 352 forks source link

encode error? #834

Open ironpythonbot opened 9 years ago

ironpythonbot commented 9 years ago

I want to use VisualStudio UITest to do my auto UI test, but I don't find window and button.
( attachment is Microsoft.VisualStudio.TestTools.UITesting.dll )
code:
import clr
clr.AddReference("Microsoft.VisualStudio.TestTools.UITesting.dll")
from Microsoft.VisualStudio.TestTools.UITesting.WpfControls import WpfWindow
w = WpfWindow()
w.SearchProperties["Name"] = "你好"
w.SearchProperties["Name"]

result: u'\u4f60\u597d'
expect : 你好

Work Item Details

Original CodePlex Issue: Issue 27523 Status: Proposed Reason Closed: Unassigned Assigned to: Unassigned Reported on: Jun 12, 2010 at 9:45 AM Reported by: zhoujg Updated on: Feb 22, 2013 at 2:10 AM Updated by: jdhardy

Binary Attachments

Microsoft.VisualStudio.TestTools.UITesting.dll

ironpythonbot commented 9 years ago

On 2010-06-22 06:14:33 UTC, billchi commented:

Does the file have a UTF8 BOM? Have you tried using a coding string (# coding: utf8 -- at the beginning of the file).