Opened 15 years ago
Closed 15 years ago
#1118 closed defect (fixed)
Alias with unicode path can't work
Reported by: | christinebao | Owned by: | Christine Bao |
---|---|---|---|
Priority: | medium | Milestone: | 2.2 |
Component: | General | Version: | 2.0.2 |
Severity: | major | Keywords: | |
Cc: | Chris Claydon | External ID: | 1262444 |
Description
Steps to reproduce:
- Create a folder with unicode name, for example "c:\测试". Put an SDF file in this folder for example City_Boundary.sdf (any SDF works).
- In MG Site Administrator page, create an alias, for example: Unicode=c:\测试.
- Open MG Studio, create an SDF connection, choose %MG_DATA_PATH_ALIAS[Unicode]%/City_Boundary.sdf. Try "Test connection".
Result:
An exception shows: the SDF file doesn't exist or can't be opened in access mode.
If choose other provider files, none of them can be connected, and they will show different error message. The key point is: the alias represents a folder with unicode name.
Attachments (1)
Change History (4)
comment:1 by , 15 years ago
by , 15 years ago
Attachment: | UnicodeAlias.patch added |
---|
comment:2 by , 15 years ago
Attach patch https://trac.osgeo.org/mapguide/attachment/ticket/1118/UnicodeAlias.patch for fixing this ticket.
comment:3 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Tech diagnosis:
The defect happens in UnmanagedDataManager.cpp,
mappingDir is STRING type, which stands for std::wstring. However doc stands for string and composited by char. So use the size of mappingDir to replace the content in doc causing path to be cut off.
To fix this, mappingDir should be converted to string type first and then replace the content in doc.