Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding string #505

Open
BIMAutoDam opened this issue Jun 6, 2023 · 1 comment
Open

Encoding string #505

BIMAutoDam opened this issue Jun 6, 2023 · 1 comment

Comments

@BIMAutoDam
Copy link

Hi, everyone.

XbimP21StringDecoder.cs provides a string decoder for IFC.
If I want to write some words with string encoding using Xbim, is there some existed classes could be used for it?

https://github.com/xBimTeam/XbimEssentials/blob/master/Xbim.Common/Step21/XbimP21StringDecoder.cs

@martin1cerny
Copy link
Member

The Toolkit will handle the encoding for you. When you set any string attribute of any IFC entity in code, we will apply the right encoding. If you read it, we will apply the right decoding. So, you can just work with Unicode C# strings.

The class used for encoding/serialization is this:

public static string ToPart21(this string source)

Do you have any special use case where you need to apply encoding/decoding outside of our parsers and serializers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants