one more special case handling of utf8 in ogr plugin - refs #1177
This commit is contained in:
parent
3b2bdba7b0
commit
19ce56b051
2 changed files with 6 additions and 15 deletions
|
@ -31,6 +31,7 @@
|
|||
#include <mapnik/boolean.hpp>
|
||||
#include <mapnik/geom_util.hpp>
|
||||
#include <mapnik/timer.hpp>
|
||||
#include <mapnik/utils.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
@ -253,7 +254,12 @@ void ogr_datasource::init(mapnik::parameters const& params)
|
|||
}
|
||||
index_name_ = dataset_name_.substr(0, breakpoint) + ".ogrindex";
|
||||
|
||||
#if defined (_WINDOWS)
|
||||
std::ifstream index_file(mapnik::utf8_to_utf16(index_name_), std::ios::in | std::ios::binary);
|
||||
#else
|
||||
std::ifstream index_file(index_name_.c_str(), std::ios::in | std::ios::binary);
|
||||
#endif
|
||||
|
||||
if (index_file)
|
||||
{
|
||||
indexed_ = true;
|
||||
|
|
|
@ -202,22 +202,7 @@ void shape_datasource::init(shape_io& shape)
|
|||
#endif
|
||||
|
||||
// check if we have an index file around
|
||||
|
||||
indexed_ = shape.has_index();
|
||||
|
||||
//std::string index_name(shape_name_+".index");
|
||||
//std::ifstream file(index_name.c_str(),std::ios::in | std::ios::binary);
|
||||
//if (file)
|
||||
//{
|
||||
// indexed_=true;
|
||||
// file.close();
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// MAPNIK_LOG_DEBUG(shape) << "shape_datasource: No .index file found for "
|
||||
// << shape_name_ << ".shp, use the 'shapeindex' program to build an index for faster rendering";
|
||||
//}
|
||||
|
||||
MAPNIK_LOG_DEBUG(shape) << "shape_datasource: Extent=" << extent_;
|
||||
MAPNIK_LOG_DEBUG(shape) << "shape_datasource: File length=" << file_length_;
|
||||
MAPNIK_LOG_DEBUG(shape) << "shape_datasource: Shape type=" << shape_type_;
|
||||
|
|
Loading…
Reference in a new issue