Skip to content

Commit d26348f

Browse files
longhuan2018a17r
authored andcommitted
Update ReaderWriterLAS.cpp
1 parent 7f4613c commit d26348f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/osgPlugins/las/ReaderWriterLAS.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <osgDB/FileUtils>
99
#include <osgDB/fstream>
1010
#include <osgDB/Registry>
11+
#include <osgDB/ConvertUTF>
1112

1213
#include <iostream>
1314
#include <iomanip>
@@ -53,7 +54,11 @@ class ReaderWriterLAS : public osgDB::ReaderWriter
5354

5455
try
5556
{
56-
pdal::Option las_opt("filename", fileName);
57+
std::string inFile = fileName;
58+
#ifdef OSG_USE_UTF8_FILENAME
59+
inFile = osgDB::convertStringFromUTF8toCurrentCodePage(inFile);
60+
#endif
61+
pdal::Option las_opt("filename", inFile);
5762
pdal::Options las_opts;
5863
las_opts.add(las_opt);
5964
pdal::PointTable table;

0 commit comments

Comments
 (0)