Merge "Add another riser support for 2U boards"
diff --git a/src/EntityManager.cpp b/src/EntityManager.cpp
index c9d0c15..eb7f90a 100644
--- a/src/EntityManager.cpp
+++ b/src/EntityManager.cpp
@@ -373,7 +373,7 @@
             }
             std::string commandStr = *(match.begin() + 1);
             // convert single ticks and single slashes into legal json
-            boost::replace_all(commandStr, "'", R"(")");
+            boost::replace_all(commandStr, "'", "\"");
             boost::replace_all(commandStr, R"(\)", R"(\\)");
             auto json = nlohmann::json::parse(commandStr, nullptr, false);
             if (json.is_discarded())
diff --git a/src/FruDevice.cpp b/src/FruDevice.cpp
index 86806ba..f2b7b29 100644
--- a/src/FruDevice.cpp
+++ b/src/FruDevice.cpp
@@ -42,6 +42,7 @@
 static constexpr std::array<const char *, 5> FRU_AREAS = {
     "INTERNAL", "CHASSIS", "BOARD", "PRODUCT", "MULTIRECORD"};
 const static constexpr char *POWER_OBJECT_NAME = "/org/openbmc/control/power0";
+const static std::regex NON_ASCII_REGEX("[^\x01-\x7f]");
 using DeviceMap = boost::container::flat_map<int, std::vector<char>>;
 using BusMap = boost::container::flat_map<int, std::shared_ptr<DeviceMap>>;
 
@@ -416,7 +417,13 @@
     object->register_interface(iface);
     for (auto &property : formattedFru)
     {
+        std::regex_replace(property.second.begin(), property.second.begin(),
+                           property.second.end(), NON_ASCII_REGEX, "_");
         iface->set_property(property.first, property.second);
+        if (DEBUG)
+        {
+            std::cout << property.first << ": " << property.second << "\n";
+        }
     }
     // baseboard can set this to -1 to not set a bus / address
     if (bus > 0)