cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Internal unique numeric id of file members, subprojects ?

amatei
13-Aquamarine

Internal unique numeric id of file members, subprojects ?

Hi there,

For example I have a project with 2 file members named "fileéè.txt" "fileàâç.txt"  using accented characters in their file names.

Is there available some kind of  internal unique numeric id for these two file members ?

The CLI console doesn't display well names with accented characters,  I see question marks ???? instead of the real characters, but the Java API is fine in this regard.

Therefore I am thinking to match the "altered" file member names received from CLI with the correct names received by using the Java API,

based on a common internal unique numeric id that these members might have.

ACCEPTED SOLUTION

Accepted Solutions
kthierer
12-Amethyst
(To:amatei)

You might also consider playing around with the chcp windows command (code page handling)

before you use cli commands.

eg:

  chcp 1252

  si print

Maybe you can find the right codepage for your needs

View solution in original post

2 REPLIES 2
kthierer
12-Amethyst
(To:amatei)

You might also consider playing around with the chcp windows command (code page handling)

before you use cli commands.

eg:

  chcp 1252

  si print

Maybe you can find the right codepage for your needs

amatei
13-Aquamarine
(To:kthierer)

Hi Klaus

Your solution is good because all file members must be representable in character set windows-1252

And surprisingly it seems to work in another situation too, when enumerating the members of a project (which can be subprojects too, not just file members)

And for subproject names I see that it is allowed to use characters from other code pages than 1252, for example I can choose characters from windows 1250 too.

For example this is a valid subproject name: t:/SomeProject/RegionalțĂȚ/project.pj

(see the attached file screen captures)

So this command works too, I can correctly read the accented characters of the subproject names

chcp 1250

si viewproject --hostname=SomeHost --port=101 --project="t:/SomeProject/project.pj" --norecurse  >members.txt

Thanks !

Announcements


Top Tags