# Resolve monaco editor can not read file which path has chinese charter.

This commit is contained in:
liuyongkai
2023-02-08 13:29:04 +08:00
parent 101456df7c
commit 677c80407a
3 changed files with 4 additions and 2 deletions
+1
View File
@@ -421,6 +421,7 @@ class repo extends control
*/
public function view($repoID, $objectID = 0, $entry = '', $revision = 'HEAD', $showBug = 'false', $encoding = '')
{
set_time_limit(0);
$browser = helper::getBrowser();
if($this->get->repoPath) $entry = $this->get->repoPath;
$this->repo->setBackSession('view', $withOtherModule = true);
+2 -2
View File
@@ -9,7 +9,7 @@
function createTab(filename, filepath)
{
$('[data-path="' + decodeURIComponent(filepath) + '"]').closest('li').addClass('selected');
var tabID = Base64.encode(filepath).replaceAll('=', '-');
var tabID = Base64.encode(Base64.encode(filepath).replaceAll('=', '-')).replaceAll('=', '-');
return {
id: tabID,
url: createLink('repo', 'ajaxGetEditorContent', urlParams.replace('%s', Base64.encode(encodeURIComponent(filepath)))),
@@ -56,7 +56,7 @@ $(function()
/* Remove file path for opened files. */
$('#fileTabs').on('onClose', function(event, tab) {
var filepath = decodeURIComponent(Base64.decode(tab.id.replaceAll('-', '=')));
var filepath = decodeURIComponent(Base64.decode(Base64.decode(tab.id.replaceAll('-', '=')).replaceAll('-', '=')));
var index = openedFiles.indexOf(filepath);
if(index > -1)
{
+1
View File
@@ -19,6 +19,7 @@ class svn extends control
*/
public function run()
{
set_time_limit(0);
$this->svn->run();
}