gpt4 book ai didi

xml - 收到的XML响应是乱码

转载 作者:行者123 更新时间:2023-12-03 03:04:25 26 4
gpt4 key购买 nike

我正在尝试解析此RSS feed的XML响应(其内容在希伯来语中):http://rcs.mako.co.il/rss/food-recipes.xml

为此,我发出一个HTTP请求:

final response = await http.get(
"http://rcs.mako.co.il/rss/food-recipes.xml",
headers: {"Content-type": "text/xml; charset=utf-8"}
);

我的问题是,我得到的不是杂乱无章的内容(而是在 主体属性内):
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>×××× - ×ת××× ×× ××ר×××ת</title>
<link>https://www.mako.co.il/food-recipes</link>
<description>×××× - ×ת××× ×× ××ר×××ת</description>
<language>he</language>
<item>
<title>××× ×××× ×× ×¤××¦× ×××ר×, ××× ×©×ר×× ×××× ××××</title>
<description>×××צק? ×¨× ×× ×¢×× ×©××× ××ר×× ××××&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/03/17/pizzaKAIMG_0864_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-bread/Recipe-efa076581b9e071027.htm?Partner=rss</link>
<pubDate>Thu, 19 Mar 2020 07:19:00 +0200</pubDate>
<guid>efa076581b9e0710VgnVCM100000700a10acRCRD</guid>
<shortDescription>×××צק? ×¨× ×× ×¢×× ×©××× ××ר×× ××××</shortDescription>
<image>https://img.mako.co.il/2020/03/17/pizzaKAIMG_0864_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/03/17/pizzaKAIMG_0864_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/03/17/pizzaKAIMG_0864_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/03/17/pizzaKAIMG_0864_i.jpg</image624X383>
<photographer>×§×¨× ×××</photographer>
</item>
<item>
<title>×ש ××ר ×××, ×××× ××¢×× ×××××: ××××ª× ××× ××צ××</title>
<description>××ת××× ××ס××¡× ××× ××× ×©×ª×צ×× ×××××ª× ×××¢×× ×ת&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/01/06/VEGAN_CHAVITA_ORI_SHAVIT_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-30-minutes/Recipe-5cb7486ed9a7f61027.htm?Partner=rss</link>
<pubDate>Thu, 19 Mar 2020 06:02:00 +0200</pubDate>
<guid>5cb7486ed9a7f610VgnVCM100000700a10acRCRD</guid>
<shortDescription>××ת××× ××ס××¡× ××× ××× ×©×ª×צ×× ×××××ª× ×××¢×× ×ת</shortDescription>
<image>https://img.mako.co.il/2020/01/06/VEGAN_CHAVITA_ORI_SHAVIT_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/01/06/VEGAN_CHAVITA_ORI_SHAVIT_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/01/06/VEGAN_CHAVITA_ORI_SHAVIT_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/01/06/VEGAN_CHAVITA_ORI_SHAVIT_i.jpg</image624X383>
<photographer>×××¨× ×©×××</photographer>
</item>
<item>
<title>×ת×× × ×× ×××××? ××× × ××× ××××¨× ×נר××× ××ש××××</title>
<description>רק ש××× ××¦× ×¢×× ×××ר××, ש×××× ××× ×× ×××ר×&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/03/04/quaker_energyballIMG_0734_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-healthy/Recipe-0fd289d29a5a071026.htm?Partner=rss</link>
<pubDate>Wed, 18 Mar 2020 07:24:00 +0200</pubDate>
<guid>0fd289d29a5a0710VgnVCM200000650a10acRCRD</guid>
<shortDescription>רק ש××× ××¦× ×¢×× ×××ר××, ש×××× ××× ×× ×××ר×</shortDescription>
<image>https://img.mako.co.il/2020/03/04/quaker_energyballIMG_0734_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/03/04/quaker_energyballIMG_0734_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/03/04/quaker_energyballIMG_0734_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/03/04/quaker_energyballIMG_0734_i.jpg</image624X383>
<photographer>ר×× ×××× × ××</photographer>
</item>
<item>
<title>ק××× ×ת ×××¡× ×××××ª× ×××פ×× × ×©××ר××£ ×ת ×רשת</title>
<description>×× × ××ש×תת ×××פ×ת שס×× ×©× ×××× × ×ת עצ××&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/03/16/TOST_HAVITA2_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-bread/Recipe-a903cb9de52e071026.htm?Partner=rss</link>
<pubDate>Tue, 17 Mar 2020 07:00:00 +0200</pubDate>
<guid>a903cb9de52e0710VgnVCM200000650a10acRCRD</guid>
<shortDescription>×× × ××ש×תת ×××פ×ת שס×× ×©× ×××× × ×ת עצ××</shortDescription>
<image>https://img.mako.co.il/2020/03/16/TOST_HAVITA2_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/03/16/TOST_HAVITA2_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/03/16/TOST_HAVITA2_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/03/16/TOST_HAVITA2_i.jpg</image624X383>
<photographer>ר×× ×××× × ××</photographer>
</item>
<item>
<title>×ר××ת ×צ×ר××× ×©× ××××: קצ×צ×ת ק×פ××××</title>
<description>ש××× ×× ××× ×קצ×צ×ת ×××× ××××ת?&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/03/15/89840581_626359704763655_6478026342796361728_n_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-meat/Recipe-cc40f835e3fd071026.htm?Partner=rss</link>
<pubDate>Mon, 16 Mar 2020 07:12:00 +0200</pubDate>
<guid>cc40f835e3fd0710VgnVCM200000650a10acRCRD</guid>
<shortDescription>ש××× ×× ××× ×קצ×צ×ת ×××× ××××ת?</shortDescription>
<image>https://img.mako.co.il/2020/03/15/89840581_626359704763655_6478026342796361728_n_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/03/15/89840581_626359704763655_6478026342796361728_n_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/03/15/89840581_626359704763655_6478026342796361728_n_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/03/15/89840581_626359704763655_6478026342796361728_n_i.jpg</image624X383>
<photographer>×פרת ×&apos;ר×פ×</photographer>
</item>
<item>
<title>תק××¢×× ×××ת? ת××× × ×¢××××ת ×רנ××× ×¢× ×§××ת!</title>
<description>×נצ××× ×ת ×××× ×¢× ×××××× ×××ת ××× ××× ×××¢××&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/03/04/quaker_cookies_ronyoIMG_0772_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-cakes/Recipe-301bfee6265a071026.htm?Partner=rss</link>
<pubDate>Mon, 16 Mar 2020 07:09:00 +0200</pubDate>
<guid>301bfee6265a0710VgnVCM200000650a10acRCRD</guid>
<shortDescription>×נצ××× ×ת ×××× ×¢× ×××××× ×××ת ××× ××× ×××¢××</shortDescription>
<image>https://img.mako.co.il/2020/03/04/quaker_cookies_ronyoIMG_0772_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/03/04/quaker_cookies_ronyoIMG_0772_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/03/04/quaker_cookies_ronyoIMG_0772_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/03/04/quaker_cookies_ronyoIMG_0772_i.jpg</image624X383>
<photographer>ר×× ×××× × ××</photographer>
</item>
<item>
<title>××× ×¢×××× ××× ×× × ×¤×¨××¡× ×××ת ×××× ×, ×× ×ר×ר</title>
<description>×¢××ת ש×ש ש××× ×× ×¢××ת תפ×××× ××××××&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/03/11/shashapplesIMG_0518_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-cakes/Recipe-8a8826fd529c071027.htm?Partner=rss</link>
<pubDate>Thu, 12 Mar 2020 07:14:00 +0200</pubDate>
<guid>8a8826fd529c0710VgnVCM100000700a10acRCRD</guid>
<shortDescription>×¢××ת ש×ש ש××× ×× ×¢××ת תפ×××× ××××××</shortDescription>
<image>https://img.mako.co.il/2020/03/11/shashapplesIMG_0518_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/03/11/shashapplesIMG_0518_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/03/11/shashapplesIMG_0518_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/03/11/shashapplesIMG_0518_i.jpg</image624X383>
<photographer>×§×¨× ×××</photographer>
</item>
<item>
<title>××× ×× ××× ×¤×××××ת ××× ××××¨× ×××ר ×××</title>
<description>×××ת ×ספצ×פ×ת ×× ××¢××× ×ר××ת ××ר×ת&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/03/08/17dayslazagne_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-gluten-free/Recipe-a5d628ad7a9b071026.htm?Partner=rss</link>
<pubDate>Tue, 10 Mar 2020 08:53:00 +0200</pubDate>
<guid>a5d628ad7a9b0710VgnVCM200000650a10acRCRD</guid>
<shortDescription>×××ת ×ספצ×פ×ת ×× ××¢××× ×ר××ת ××ר×ת</shortDescription>
<image>https://img.mako.co.il/2020/03/08/17dayslazagne_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/03/08/17dayslazagne_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/03/08/17dayslazagne_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/03/08/17dayslazagne_i.jpg</image624X383>
<photographer>××××ר ×¨× ×××</photographer>
</item>
<item>
<title>תש××× ××× ×× ×©×××¢×ª× ×¢× ×¡×× ××××××רף ××××××××</title>
<description>ק××× ×ת ××××××רף ×× ×× ×ª× × ××× ×נש×× ×× ×©× ××××&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/03/05/waldorf_yogev26.2.200633_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-salads/Recipe-4a91f077d8aa071026.htm?Partner=rss</link>
<pubDate>Sun, 08 Mar 2020 07:03:00 +0200</pubDate>
<guid>4a91f077d8aa0710VgnVCM200000650a10acRCRD</guid>
<shortDescription>ק××× ×ת ××××××רף ×× ×× ×ª× × ××× ×נש×× ×× ×©× ××××</shortDescription>
<image>https://img.mako.co.il/2020/03/05/waldorf_yogev26.2.200633_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/03/05/waldorf_yogev26.2.200633_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/03/05/waldorf_yogev26.2.200633_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/03/05/waldorf_yogev26.2.200633_i.jpg</image624X383>
<photographer>×××ר ×× ××</photographer>
</item>
<item>
<title>××¢××××ת ×ר××× ×××× ×ש ×ת××ת ס××</title>
<description>×× ×ª××× ×××××, × ××× ×ת×× ×× ××××× ××××&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/01/09/P1980863_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-cakes/Recipe-5cfaa737a6a8f61027.htm?Partner=rss</link>
<pubDate>Thu, 05 Mar 2020 07:19:00 +0200</pubDate>
<guid>5cfaa737a6a8f610VgnVCM100000700a10acRCRD</guid>
<shortDescription>×× ×ª××× ×××××, × ××× ×ת×× ×× ××××× ××××</shortDescription>
<image>https://img.mako.co.il/2020/01/09/P1980863_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/01/09/P1980863_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/01/09/P1980863_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/01/09/P1980863_i.jpg</image624X383>
<photographer>×××¨× ×©×××</photographer>
</item>
<item>
<title>×××× ××ת ש×ק××× ×¦&apos;×פס ××ר×פ×ת ×ש×ת</title>
<description>××תר ××× ××× ××ר××ת ××קר ש×ת - פש×× ×××&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/03/04/ROHAV_lahmaniotCCIMG_0092_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-cakes/Recipe-e6c997d5045a071026.htm?Partner=rss</link>
<pubDate>Thu, 05 Mar 2020 07:12:00 +0200</pubDate>
<guid>e6c997d5045a0710VgnVCM200000650a10acRCRD</guid>
<shortDescription>××תר ××× ××× ××ר××ת ××קר ש×ת - פש×× ×××</shortDescription>
<image>https://img.mako.co.il/2020/03/04/ROHAV_lahmaniotCCIMG_0092_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/03/04/ROHAV_lahmaniotCCIMG_0092_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/03/04/ROHAV_lahmaniotCCIMG_0092_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/03/04/ROHAV_lahmaniotCCIMG_0092_i.jpg</image624X383>
<photographer>×§×¨× ×××</photographer>
</item>
<item>
<title>×ש×× × ××ת×: ××ת××× ××××× × ×××× ×©× ×¨×××××</title>
<description>×× ×× ××©× × ×× ××××××, ××צק ×××× ××××ת ××¢×××&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/03/01/erezbenshahar_haman2020_recipe_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-holidays/Recipe-36dbad97f169071027.htm?Partner=rss</link>
<pubDate>Wed, 04 Mar 2020 07:18:00 +0200</pubDate>
<guid>36dbad97f1690710VgnVCM100000700a10acRCRD</guid>
<shortDescription>×× ×× ××©× × ×× ××××××, ××צק ×××× ××××ת ××¢×××</shortDescription>
<image>https://img.mako.co.il/2020/03/01/erezbenshahar_haman2020_recipe_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/03/01/erezbenshahar_haman2020_recipe_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/03/01/erezbenshahar_haman2020_recipe_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/03/01/erezbenshahar_haman2020_recipe_i.jpg</image624X383>
<photographer>××¨× ×× ×©×ר</photographer>
</item>
<item>
<title>×צ×× × ××¨× ×¤× ×ס××ת ×ש××¨× ×ת ×××××¡× ×©× ×××קר</title>
<description>×× ×××× ×©× ×××סת ק×××קר ×¢× ×× ××××£ ×©× ×¤××&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/03/03/DAISA_APLLEPIE_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-healthy/Recipe-7f5118535df9071026.htm?Partner=rss</link>
<pubDate>Wed, 04 Mar 2020 07:00:00 +0200</pubDate>
<guid>7f5118535df90710VgnVCM200000650a10acRCRD</guid>
<shortDescription>×× ×××× ×©× ×××סת ק×××קר ×¢× ×× ××××£ ×©× ×¤××</shortDescription>
<image>https://img.mako.co.il/2020/03/03/DAISA_APLLEPIE_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/03/03/DAISA_APLLEPIE_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/03/03/DAISA_APLLEPIE_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/03/03/DAISA_APLLEPIE_i.jpg</image624X383>
<photographer>ר×× ×××× × ××</photographer>
</item>
<item>
<title>×××פ ×ק×× ×©×©×× × ×× × ×ת ×שנ××¦× ××§×¦× ×קצ×</title>
<description>××¤× × ×©××ª× ×ר×××× ××× ××ª× ×××××× ×נס×ת ×××ת!&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/03/01/20200210_120445_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-chicken/Recipe-66843b143d59071027.htm?Partner=rss</link>
<pubDate>Tue, 03 Mar 2020 07:14:00 +0200</pubDate>
<guid>66843b143d590710VgnVCM100000700a10acRCRD</guid>
<shortDescription>××¤× × ×©××ª× ×ר×××× ××× ××ª× ×××××× ×נס×ת ×××ת!</shortDescription>
<image>https://img.mako.co.il/2020/03/01/20200210_120445_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/03/01/20200210_120445_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/03/01/20200210_120445_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/03/01/20200210_120445_i.jpg</image624X383>
<photographer>×× × ×ר-×× ×©××רץ</photographer>
</item>
<item>
<title>×ש××× ××× ×ת ×××ש××: ×¢××××ת ענק ×-6 ××¢×××</title>
<description>×× ×× ×©×ק×× ××× ××ר ××פ×× ××¢×××פ×צת&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/03/03/IMG_0453_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-cakes/Recipe-7f673ed9a269071026.htm?Partner=rss</link>
<pubDate>Tue, 03 Mar 2020 07:10:00 +0200</pubDate>
<guid>7f673ed9a2690710VgnVCM200000650a10acRCRD</guid>
<shortDescription>×× ×× ×©×ק×× ××× ××ר ××פ×× ××¢×××פ×צת</shortDescription>
<image>https://img.mako.co.il/2020/03/03/IMG_0453_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/03/03/IMG_0453_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/03/03/IMG_0453_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/03/03/IMG_0453_i.jpg</image624X383>
<photographer>ר×× ×××× × ××</photographer>
</item>
<item>
<title>××ת ×¢××ת ××× × ×ת ××××©× ×©×× ×, ×××¤×¢× ×× ×ת×××</title>
<description>××× ××ת ×× ×¢××ת ××× × × ××× ×ת×××ת שפ×שת×?&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/02/26/banana_shaishIMG_9678_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-cakes/Recipe-2ddd4aa57718071027.htm?Partner=rss</link>
<pubDate>Thu, 27 Feb 2020 07:10:00 +0200</pubDate>
<guid>2ddd4aa577180710VgnVCM100000700a10acRCRD</guid>
<shortDescription>××× ××ת ×× ×¢××ת ××× × × ××× ×ת×××ת שפ×שת×?</shortDescription>
<image>https://img.mako.co.il/2020/02/26/banana_shaishIMG_9678_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/02/26/banana_shaishIMG_9678_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/02/26/banana_shaishIMG_9678_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/02/26/banana_shaishIMG_9678_i.jpg</image624X383>
<photographer>×§×¨× ×××</photographer>
</item>
<item>
<title>ק××× ××ת×: ×× ×ס×××ת ×קצ×צ×ת ×××¢×× ××ת ××××</title>
<description>××× ×ת××× ×קצ×צ×ת ×¢×ש×× ×©××ר×ת ×פ×ר××ת&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/01/09/ktsitsotP1980655_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-vegetarian-recipes/Recipe-dbc99f869c98f61027.htm?Partner=rss</link>
<pubDate>Wed, 26 Feb 2020 19:43:00 +0200</pubDate>
<guid>dbc99f869c98f610VgnVCM100000700a10acRCRD</guid>
<shortDescription>××× ×ת××× ×קצ×צ×ת ×¢×ש×× ×©××ר×ת ×פ×ר××ת</shortDescription>
<image>https://img.mako.co.il/2020/01/09/ktsitsotP1980655_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/01/09/ktsitsotP1980655_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/01/09/ktsitsotP1980655_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/01/09/ktsitsotP1980655_i.jpg</image624X383>
<photographer>×××¨× ×©×××</photographer>
</item>
<item>
<title>×ת ×שקש××§× ××× ×××× ×××× ×× ×¨×§ ××©× × ×ר×××××</title>
<description>רק תקפ××× ×©×שנ××× ×××× ×××× ×ספ×ק ××××ת×××&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/02/20/shutterstock_586573883_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-one-pot-meal/Recipe-664a6ed7d567071027.htm?Partner=rss</link>
<pubDate>Tue, 25 Feb 2020 07:14:00 +0200</pubDate>
<guid>664a6ed7d5670710VgnVCM100000700a10acRCRD</guid>
<shortDescription>רק תקפ××× ×©×שנ××× ×××× ×××× ×ספ×ק ××××ת×××</shortDescription>
<image>https://img.mako.co.il/2020/02/20/shutterstock_586573883_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/02/20/shutterstock_586573883_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/02/20/shutterstock_586573883_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/02/20/shutterstock_586573883_i.jpg</image624X383>
<photographer>j.chizhe</photographer>
</item>
<item>
<title>×××××× ×××ª× ×©×× ×ª×¦×××× ××פס×ק ×נשנש</title>
<description>××פ××× ××× ×× ×¨×× ×ק××&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/02/23/IMG_8618_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-gluten-free/Recipe-5acbcb0abe17071027.htm?Partner=rss</link>
<pubDate>Tue, 25 Feb 2020 07:00:00 +0200</pubDate>
<guid>5acbcb0abe170710VgnVCM100000700a10acRCRD</guid>
<shortDescription>××פ××× ××× ×× ×¨×× ×ק××</shortDescription>
<image>https://img.mako.co.il/2020/02/23/IMG_8618_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/02/23/IMG_8618_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/02/23/IMG_8618_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/02/23/IMG_8618_i.jpg</image624X383>
<photographer>ר×× ×××× × ××</photographer>
</item>
<item>
<title>××סק××××××, ×§×¨× ×ת×ת××: ××¢××× ×©×× × ×ס×פ&quot;ש</title>
<description>×× ×פ×× ×©×ר×ש ××× × ×©×ª× ×ª×× ××ת ×©× ××××¤× ×××?&lt;p&gt;&lt;img src=&apos;https://img.mako.co.il/2020/02/19/tutim_ron_yo_a.jpg&apos;/&gt;&lt;/p&gt;</description>
<link>https://www.mako.co.il/food-recipes/recipes_column-cakes/Recipe-39d4b82d1ac5071026.htm?Partner=rss</link>
<pubDate>Thu, 20 Feb 2020 14:00:00 +0200</pubDate>
<guid>39d4b82d1ac50710VgnVCM200000650a10acRCRD</guid>
<shortDescription>×× ×פ×× ×©×ר×ש ××× × ×©×ª× ×ª×× ××ת ×©× ××××¤× ×××?</shortDescription>
<image>https://img.mako.co.il/2020/02/19/tutim_ron_yo_a.jpg</image>
<image139X80>https://img.mako.co.il/2020/02/19/tutim_ron_yo_f.jpg</image139X80>
<image435X329>https://img.mako.co.il/2020/02/19/tutim_ron_yo_c.jpg</image435X329>
<image624X383>https://img.mako.co.il/2020/02/19/tutim_ron_yo_i.jpg</image624X383>
<photographer>ר×× ×××× × ××</photographer>
</item>
</channel>
</rss>

将内容解析为列表后的样子:

enter image description here

我该如何解决?

最佳答案

看起来服务器未按照HTTP库期望的格式设置响应字符集。 response.body错误地将响应数据解码为Latin1。

如果您无法修复服务器,则以下代码将原始数据手动解码为UTF-8并为我工作:

final response = await http.get("http://rcs.mako.co.il/rss/food-recipes.xml");
final body = Utf8Decoder().convert(response.bodyBytes);
final document = xml.parse(body);
print(document.toString());

关于xml - 收到的XML响应是乱码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60790948/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com