The Alembic don't support Chinese path #49112

Closed
opened 2016-08-19 05:08:22 +02:00 by Leroy · 13 comments

System Information
windows 7 64bit sp1

Blender Version
Broken: 2.77.3 1fe9d67
Worked: (optional)

The Alembic don't support Chinese path, Whether import or export.
test.zip

Exact steps for others to reproduce the error
Download the test file, it's have contain one folder and named with Chinese, whether import or export, all not work, export not report error, but no file in the folder. Even check the International Fonts in the User Preferences, still not work. this not a big problem, just want the developer know it, thanks :D

**System Information** windows 7 64bit sp1 **Blender Version** Broken: 2.77.3 1fe9d67 Worked: (optional) The Alembic don't support Chinese path, Whether import or export. [test.zip](https://archive.blender.org/developer/F338940/test.zip) **Exact steps for others to reproduce the error** Download the test file, it's have contain one folder and named with Chinese, whether import or export, all not work, export not report error, but no file in the folder. Even check the International Fonts in the User Preferences, still not work. this not a big problem, just want the developer know it, thanks :D
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @Leroy-Xie

Added subscriber: @Leroy-Xie

Added subscribers: @kjym3, @kevindietrich

Added subscribers: @kjym3, @kevindietrich

I can't reproduce this here on Linux (both import and export work fine), maybe this a Windows path issue (or character encoding shenanigan)?

@kjym3 can you try to reproduce this?

I can't reproduce this here on Linux (both import and export work fine), maybe this a Windows path issue (or character encoding shenanigan)? @kjym3 can you try to reproduce this?

Added subscriber: @brecht

Added subscriber: @brecht

For unicode paths to work on Windows you need to use specific functions to open files, like _wfopen with wchar_t or std::ifstream with std::wstring. I don't see anything like that happening in the Alembic library itself or the Blender code using it.

If we could pass a file stream rather than a filename to Alembic that would make it possible to solve this on the Blender side, but I don't see a way to do that (not sure it's impossible though, not really familiar with the Alembic API).

It may well be that the Alembic library needs to be fixed and that other applications have the same limitation.

For unicode paths to work on Windows you need to use specific functions to open files, like `_wfopen` with `wchar_t` or `std::ifstream` with `std::wstring`. I don't see anything like that happening in the Alembic library itself or the Blender code using it. If we could pass a file stream rather than a filename to Alembic that would make it possible to solve this on the Blender side, but I don't see a way to do that (not sure it's impossible though, not really familiar with the Alembic API). It may well be that the Alembic library needs to be fixed and that other applications have the same limitation.

Added subscriber: @mont29

Added subscriber: @mont29

@kevindietrich please double check whether we can do that or not with current alembic, if not possible best is to close this report and 'forward' it to alembic devs I guess?

@kevindietrich please double check whether we can do that or not with current alembic, if not possible best is to close this report and 'forward' it to alembic devs I guess?

I thought using wstring & co was discouraged on Windows (or is it just the UTF-8 guys saying so?). Anyway, it should be doable to use streams instead of passing the file name.

I thought using wstring & co was discouraged on Windows (or is it just the UTF-8 guys saying so?). Anyway, it should be doable to use streams instead of passing the file name.

I'm not sure why it would be discouraged. We use UTF-8 as much as possible in Blender, but at some point we need to convert to UTF-16, as far as I know there is no way around that on Windows.

I'm not sure why it would be discouraged. We use UTF-8 as much as possible in Blender, but at some point we need to convert to UTF-16, as far as I know there is no way around that on Windows.

I uploaded a patch to make use of streams (D2160), maybe people using Windows around it can test/review it before committing to master?

I uploaded a patch to make use of streams ([D2160](https://archive.blender.org/developer/D2160)), maybe people using Windows around it can test/review it before committing to master?

This issue was referenced by 3c533be77e

This issue was referenced by 3c533be77ea8f6c88b188eb870bb46ba972d1372

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#49112
No description provided.