mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Unicode
- The configuration file now supports JSON encoding of Unicode characters, by specifying \uNNNN.
This commit is contained in:
parent
67f20d96bc
commit
74bbd6cefe
5 changed files with 12 additions and 5 deletions
|
@ -29,6 +29,7 @@
|
|||
#include <sstream>
|
||||
#include <algorithm>
|
||||
#include <Context.h>
|
||||
#include <JSON.h>
|
||||
#include <i18n.h>
|
||||
#include <text.h>
|
||||
#include <util.h>
|
||||
|
@ -103,9 +104,9 @@ int CmdConfig::execute (std::string& output)
|
|||
if (confirm (format (STRING_CMD_CONFIG_CONFIRM, name, context.config.get (name), value)))
|
||||
{
|
||||
if (comment != std::string::npos)
|
||||
*line = name + "=" + value + " " + line->substr (comment);
|
||||
*line = name + "=" + json::encode (value) + " " + line->substr (comment);
|
||||
else
|
||||
*line = name + "=" + value;
|
||||
*line = name + "=" + json::encode (value);
|
||||
|
||||
change = true;
|
||||
}
|
||||
|
@ -116,7 +117,7 @@ int CmdConfig::execute (std::string& output)
|
|||
if (!found &&
|
||||
confirm (format (STRING_CMD_CONFIG_CONFIRM2, name, value)))
|
||||
{
|
||||
contents.push_back (name + "=" + value);
|
||||
contents.push_back (name + "=" + json::encode (value));
|
||||
change = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue