Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® FBX® / FBX SDK / Bug report : Corruption error when loading an FBX file from a folder containing special characters
  RSS 2.0 ATOM  

Bug report : Corruption error when loading an FBX file from a folder containing special characters
Rate this thread
 
33886
 
Permlink of this thread  
avatar
  • Nismael
  • Posted: 01 September 2009 02:01 AM
  • Total Posts: 12
  • Joined: 05 May 2009 06:11 PM

Hi,

while playing with the sdk today I happened to open a file that was located in a folder which name contains a french character, the ç. Instead of working as intended, the “Initialize” method of the KFbxImporter class reported me a “Corrupted or Invalid file” error. I guess it should not.



Replies: 0
avatar
  • TravF
  • Posted: 01 September 2009 08:55 AM

Is your FBX project compiled as multi-byte character set or unicode character set?
I would try Unicode if not.



Replies: 0
avatar
  • Eric Feng
  • Posted: 02 September 2009 03:15 PM

Nismael 01 September 2009 09:01 AM

Hi,

while playing with the sdk today I happened to open a file that was located in a folder which name contains a french character, the ç. Instead of working as intended, the “Initialize” method of the KFbxImporter class reported me a “Corrupted or Invalid file” error. I guess it should not.

So is your “regional and language options” set french as the “current language as the non-unicode program”?
If not, the corruption error will show. And this is an known limitation.



Eric Feng, Framestore

Replies: 0
avatar
  • TravF
  • Posted: 07 September 2009 11:37 AM

Hi,

I just noticed that there is no pathway for wide-character (wchar_t*) filepaths, or filenames with non-english characters in them.

In kfbximporter.h and kfbxexporter.h:
virtual bool Initialize(const char *pFileName, const int pFileFormat = -1)
virtual bool Initialize(const char *pFileName, int pFileFormat = -1)

These functions only take ANSI characters.

Is this correct?  Will support for non-ANSI filenames be added in a future release? 
Or please tell me how to load a filename with non-ANSI characters?



Replies: 1
/userdata/avatar/vx3501hqr_small.jpg

This is a limitation, we will surely consider to support non-ANSI file names.
Just as what Eric said, at this moment, if you try to load a file whose name/path contains non-ANSI characters, you have to make sure “Language for non-Unicode programs” is set to corresponding code page.
(Control panel->Regional and Language Options->Advanced->Set the “Language for non-Unicode programs” )

Author: Jiayang Xu

Replied: 07 September 2009 07:18 PM  
avatar
  • luinil
  • Posted: 12 May 2010 07:57 PM

Hello

I am currently working on the SDK and as the answers are pretty old, I’ll ask once again to be sure.

I saw that all functions uses char and not wide char, as when I want to get the chars from a KString, I can get only chars and no wide chars.

As I’m working in a Japanese environment I would prefer to use wide chars if possible, but with the current version of the SDK, only ansi chars are supported right ?

Thanks for you answer.



Replies: 1
/userdata/avatar/vx3501hqr_small.jpg

Sorry to say, but Unicode is not fully supported yet…
So for now the safest way is to use ANSI char rather than widechar.

Author: Jiayang Xu

Replied: 12 May 2010 10:53 PM  
avatar
  • luinil
  • Posted: 12 May 2010 11:04 PM

Ok, Thanks for your answer



Replies: 0