# ifdef BOOST_WINDOWS_PATH // for BOOST_WINDOWS_PATH, convert alt_separator ('\') to separator ('/') bool is_alt_separator = (value == path_alt_separator::value); if(std::string(std::setlocale(LC_ALL, "")).find(".950")){ m_path += value; if(is_alt_separator){ std::string::const_iterator it = m_path.end(); --it; int lsb = *(it); --it; int msb = *(it); if(!detail::is_big5_char(0xff & msb, 0xff & lsb)){ // not a part of the big5 char, patching it. *(--m_path.end()) = slash::value; } } } else { m_path += ( is_alt_separator ? slash::value: value ); } # else m_path += value; m_path += value; # endif } // check two bytes could be a valid big5 char. bool is_big5_char(int msb, int lsb){ bool ret = false; if(msb >= 0x81 && msb <= 0xfe){ if(lsb >= 0x40 && lsb <= 0x7e){ ret = true; } if(lsb >= 0xa1 && lsb <= 0xfe){ ret = true; } } return ret; }