fix: replace mojibake pound signs with unicode escape across all price strings
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
namespace EbayListingTool.Models;
|
||||
namespace EbayListingTool.Models;
|
||||
|
||||
public class PhotoAnalysisResult
|
||||
{
|
||||
@@ -18,6 +18,6 @@ public class PhotoAnalysisResult
|
||||
|
||||
public string PriceRangeDisplay =>
|
||||
PriceMin > 0 && PriceMax > 0
|
||||
? $"£{PriceMin:F2} – £{PriceMax:F2} (suggested £{PriceSuggested:F2})"
|
||||
: PriceSuggested > 0 ? $"£{PriceSuggested:F2}" : "";
|
||||
? $"\u00A3{PriceMin:F2} – \u00A3{PriceMax:F2} (suggested \u00A3{PriceSuggested:F2})"
|
||||
: PriceSuggested > 0 ? $"\u00A3{PriceSuggested:F2}" : "";
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EbayListingTool.Models;
|
||||
namespace EbayListingTool.Models;
|
||||
|
||||
public class SavedListing
|
||||
{
|
||||
@@ -28,7 +28,7 @@ public class SavedListing
|
||||
|
||||
public string FirstPhotoPath => PhotoPaths.Count > 0 ? PhotoPaths[0] : "";
|
||||
|
||||
public string PriceDisplay => Price > 0 ? $"£{Price:F2}" : "—";
|
||||
public string PriceDisplay => Price > 0 ? $"\u00A3{Price:F2}" : "—";
|
||||
|
||||
public string SavedAtDisplay => SavedAt.ToLocalTime().ToString("d MMM yyyy, HH:mm");
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Net.Http;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using EbayListingTool.Models;
|
||||
@@ -65,7 +65,7 @@ public class AiAssistantService
|
||||
string priceContext = "";
|
||||
if (soldPrices != null && soldPrices.Any())
|
||||
{
|
||||
var prices = soldPrices.Select(p => $"£{p:F2}");
|
||||
var prices = soldPrices.Select(p => $"\u00A3{p:F2}");
|
||||
priceContext = $"\nRecent eBay UK sold prices for similar items: {string.Join(", ", prices)}";
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ public class AiAssistantService
|
||||
RefineWithCorrectionsAsync(string title, string description, decimal price, string corrections)
|
||||
{
|
||||
var priceContext = price > 0
|
||||
? $"Current price: £{price:F2}\n\n"
|
||||
? $"Current price: \u00A3{price:F2}\n\n"
|
||||
: "";
|
||||
|
||||
var prompt =
|
||||
@@ -246,7 +246,7 @@ public class AiAssistantService
|
||||
" \"confidence_notes\": \"one sentence explaining confidence level, e.g. brand clearly visible on label\"\n" +
|
||||
"}\n\n" +
|
||||
"For prices: research realistic eBay UK sold prices in your knowledge. " +
|
||||
"price_suggested should be a good Buy It Now price. Use GBP numbers only (no £ symbol).";
|
||||
"price_suggested should be a good Buy It Now price. Use GBP numbers only (no \u00A3 symbol).";
|
||||
|
||||
var json = await CallWithVisionAsync(dataUrls, prompt);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text.RegularExpressions;
|
||||
using EbayListingTool.Models;
|
||||
|
||||
namespace EbayListingTool.Services;
|
||||
@@ -39,7 +39,7 @@ public class PriceLookupService
|
||||
return new PriceSuggestion(
|
||||
result.Suggested,
|
||||
"ebay",
|
||||
$"eBay suggests £{result.Suggested:F2} (from {result.Count} listings)");
|
||||
$"eBay suggests \u00A3{result.Suggested:F2} (from {result.Count} listings)");
|
||||
}
|
||||
catch { /* eBay unavailable — fall through */ }
|
||||
|
||||
@@ -58,7 +58,7 @@ public class PriceLookupService
|
||||
return new PriceSuggestion(
|
||||
avg,
|
||||
"history",
|
||||
$"Your avg for {listing.Category}: £{avg:F2} ({sameCat.Count} listings)");
|
||||
$"Your avg for {listing.Category}: \u00A3{avg:F2} ({sameCat.Count} listings)");
|
||||
}
|
||||
|
||||
// 3. AI estimate
|
||||
@@ -73,7 +73,7 @@ public class PriceLookupService
|
||||
out var price)
|
||||
&& price > 0)
|
||||
{
|
||||
return new PriceSuggestion(price, "ai", $"AI estimate: £{price:F2}");
|
||||
return new PriceSuggestion(price, "ai", $"AI estimate: \u00A3{price:F2}");
|
||||
}
|
||||
}
|
||||
catch { /* AI unavailable */ }
|
||||
|
||||
@@ -196,7 +196,7 @@ public class SavedListingsService
|
||||
var sb = new System.Text.StringBuilder();
|
||||
sb.AppendLine($"Title: {title}");
|
||||
sb.AppendLine($"Category: {category}");
|
||||
sb.AppendLine($"Price: £{price:F2}");
|
||||
sb.AppendLine($"Price: \u00A3{price:F2}");
|
||||
if (!string.IsNullOrWhiteSpace(conditionNotes))
|
||||
sb.AppendLine($"Condition: {conditionNotes}");
|
||||
sb.AppendLine();
|
||||
|
||||
@@ -230,7 +230,7 @@ public partial class NewListingView : UserControl
|
||||
|
||||
if (result.PriceMin > 0 && result.PriceMax > 0)
|
||||
{
|
||||
BPriceHint.Text = $"AI estimate: £{result.PriceMin:F2} – £{result.PriceMax:F2}";
|
||||
BPriceHint.Text = $"AI estimate: \u00A3{result.PriceMin:F2} – \u00A3{result.PriceMax:F2}";
|
||||
BPriceHint.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user